Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

For a number of reasons I'd recommend running such a game at a fixed framerate when it comes to updates. Rendering can run variable framerate using interpolation or extrapolation.

Other than that, I'm not sure what's what in your system. Is it the client or the server you're talking about here? I'll assume the client since you're talking pixel values, but can't work out how that relates to the server. How often are you sending updates? It'd be a reasonable goal to keep things deterministic between network data updates and input, ie if you save those two input streams and replay them you get exactly the same result.

share|improve this answer
    
I am recording things on the server. –  jmp97 Oct 19 '10 at 8:45
    
and you're running AI on the client? –  slicedlime Oct 19 '10 at 13:36
    
No, all the AI is running on the server –  jmp97 Oct 19 '10 at 14:44
    
I see, well I think the only reasonable way to implement that would be to run a fixed-step simulation. Not sure why you'd want variable framerate on a server anyway. –  slicedlime Oct 20 '10 at 15:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.