- pathfinderI side-stepped this one, fixed point isn't as fast, so I'm just sending move updates from the server.
- shot hit calculationConverted to fixed point.
- collision detection ( is there something like this when units move beside the pathfinder?) There is no 'collision detection' of any note in Glest, beyond the cell map.
- unit placementIs all integer.
- random number calculationThe only ones that make a difference to the game state were already integer, int and fixed interoperate nicely.
- unit uphill/downhill speedup
- terrain smoothing after loading maps ( this effects the one above too)The move updates mentioned above also contain the length of the skill cycle, the 'servers says', the client does.
Did you find some more Problems?
All skills are updated via floating point, a progress counter between 0 and 1 is added to in each update(), these cycle lengths are all the same except for the move skill, so the server calculates them all and sends the results to the clients before the game starts, This is in the SkillCycleTable class. This also holds anim cycle lengths, and attack system start times (as a frame offset into the animation cycle) for attack skills. Also, projectile paths are calculated by the server and sent as updates, although this could probably be converted to fixed point without to much concern over performance.
By the way do you use an external lib to do this fixed point calculation? When these problems showed up the first time someone from the springRTS community mentioned something like this.
No, I rolled my own, borrowing the sqrt() function from c.snippets.org. Fixed point needs to be handled carefully, using someone else's code would not have been a good idea I don't think. You need to know how they work to use them effectively, and safely.