Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If you start using floating point all your bets are off. You will run into hard to find/fix problems where you get different values even on the same platform, just by choosing a Intel or AMD cpu.</p> <p>Lots of runtime libraries have optimized code-paths for different chips. These are all within the spec, but some are slightly more precise than that. This results in subtle roundoff errors that sooner or later accumulate to a difference that may break things.</p> <p>Your goal should be to get away without 100% determinisim. After all: Does it matter for the player if a opponent is a pixel more to the left than it should? It is not. What is important is, that the little differences between clients and server don't ruin the gameplay.</p> <p>What the player sees on his screen should look deterministic, so he doesn't feel cheated, but it is in no way required.</p> <p>The games I've worked on archived this by constantly resynchronizing the game-state of all entities between all clients. We did however almost never sent the entire gamestate but we sent the game state of few objects each frame distributing the job over several seconds.</p> <p>Just give the objects where it matters most higher priority than other and it will be fine. In a car racing game for example it does not matter to have the exact position of an opponent car if it is far away from you, and it's fine to only update it every 20 seconds or so.</p> <p>Inbetween these updates just trust that the little round-off errors don't accumulate so much that you run into troubles.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload