[gameprogrammer] Re: floating point vs fixed

Alan Wolfe wrote:

Are the floating point tables different enough on different CPUs to be
worried that a simulation would run substantially different on
different systems?

Some things you don't mention: I'm assuming this game is networked, and therefore you might get different results for the same simulation step on different machines? Is a single machine authoritative for any given simulation, or do multiple machines have to agree on the synchronization at each step?

If you have to synchronize multiple simulations across multiple computers, I'm inclined to say floating point will cause you a world of hurt. Small errors in calculation can lead to ultimately big differences. "How much health does unit X have" can vary quite a bit if some damaging effect was in range on one machine, and out of range on another.

If you can have a single authoritative source for each such calculation - like a network-wide "X just got damaged for Y points" event if the unit is within range, sent by the master for that event to everyone else - you can probably mitigate it.
--
 Matthew Weigel
 hacker
 unique & idempot.ent

---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: