update(100) behaves slightly different than 10 times update(10) - is that a problem? [on hold]
- by futlib
While looking into some test failures, I've identified an curious issue with my update logic.
This:
game.update(100);
Behaves slightly different from:
for (int i = 0; i < 10; i++)
game.update(10);
The concrete example here is a rotating entity. It rotates by exactly 360 degrees in the first case, but only by about 352 in the second.
This leads to slight variations in how things move, depending on the frame rate. Not enough to be noticeable in practice, but I did notice it when writing tests.
Now my question is: Should this be fully deterministic, i.e. the outcome of update(1) * n should equal update(n) exactly? Or is it normal to have some variance and I should make my test assertions more generous?