Ok, it seems that I missed a few spots of non-deteminism (System.currentTimeMillis() and Sys.getTime() and isSoundPlaying()(!)). I’ve updated the sample and added a checksum check that can be enabled by uncommenting a few lines in the gameloop. The game should now play back perfectly. To Thijs: I replaced System.currentTimeMillis() - lastTime with a constant elapsed time of 1000/HZ, since the frame time is synced to HZ anyway. As you correctly noted, you can’t practically have game loops that steps according to currentTimeMillis or similar. If you want that, you’ll need to update game state in fixed size steps:
long currentTime = System.currentTimeMillis() ;
long elapsed = currentTime - lastTime;
lastTime = currentTime;
while (elapsed > MILLIS_PER_TICK) {
updateGameState(MILLIS_PER_TICK);
elapsed -= MILLIS_PER_TICK;
}