News for hackers. Stuff that matters.
Re:Lessons learned while developing Age of Empires 1 Definit... by jandrese on Thursday February 15, 2018 @11:10AM (#16385117)
Of course if you want your game to update its state at a rate faster than the slowest ping time of the connected client then you've got problems. On LAN play you can get away with this, but over the Internet it's not as workable, especially if some players are on modem.

I remember one game that has crossplay between Linux and Windows brought down by a scheme like this, because it turns out that Linux and Windows default floating point libraries had slightly different rounding behavior, and eventually the pathfinding algorithm would zig on the Windows hosts and zag on the Linux hosts and desync the clients.

Re:Lessons learned while developing Age of Empires 1 Definit... by skittlebrau on Thursday February 15, 2018 @11:37AM (#16385357)
You can run your updates faster than the slowest ping. You just need more command latency. So when you, say, command a unit to move somewhere, there's an agreed-upon future time when that's going to happen. This time has to be longer than it takes for the command to get to everyone. If it's not, then you stall. If command latency is very high, the game feels very unresponsive though (and tricks of showing local/visual-only confirmation of your commands only goes so far).

You can't run updates any faster than the slowest machine can run them, though, or again you stall. This was a bigger problem on Age 1 and 2 where render rate and update rate were linked. On Age of Mythology and beyond, the render rate was decoupled from the update rate, so updates could happen more slowly while animations and so forth could still look smooth via interpolation.

Re:Lessons learned while developing Age of Empires 1 Definit... by a_t48 on Thursday February 15, 2018 @12:59PM (#16386067)
I used command latency to do multiplayer for an RTS\Tower Defense on mobile (https://youtu.be/tRAdI0x7L7c?t=300 - think Battle Cats but in 3D). All units were AI controlled, and placing a unit meant it had to go through a spawn animation. It meant the game worked with ping times in the range of seconds. Add in some positional interpolation and events for when each unit changed targets and it worked great.
Re:Lessons learned while developing Age of Empires 1 Definit... by Sir_Cmpwn on Thursday February 15, 2018 @02:09PM (#16386606)
As an aside, fixing that problem should be feasible. Linux (or rather libgcc or whatever the case may be) uses an open source floating point implementation (and not virial like the GPL): https://github.com/gcc-mirror/gcc/tree/master/libgcc/soft-fp

With enough finageling you could utilize the libgcc floating point implementation on Windows and make it consistent everywhere. Or you could take the wiser approach of avoiding floats outside of graphics code and using fixed point instead.