In order to detect and reproduce bugs in an MMO, recording game sessions on the server can help.
How can such recording and replay of the data be implemented to be accurate, i.e. be 100% deterministic / produce exactly the same result on each replay?
I intend to record timestamped incoming messages as the only data necessary, if possible. The playback would use the database snapshot as present at the beginning of the recording.
Details about the MMO
- mainly I/O driven (act on incoming network messages plus simple periodic AI)
- 2D
- C++ and Lua, RDBMS for storage.
- Clients send updates at around 1-3 times per second due to the simple nature of the MMO
In particular, consider timing issues:
If run-time for computations on playback differ from the run-times when recorded, frame times will also differ and can for example affect the movement of NPC units (move 3px instead of 1px).
How to make sure that in the replay AI has the same time constraints compared to when recorded? Fixed time-step? Record the time deltas between each frame and on replay make sure those deltas determine the actual frame time?