PDA

View Full Version : How to implement a "record" & "replay&quo



Damot
08-10-2008, 02:28 PM
How would any of you recommend implementing a "record" feature in a game, so a player can replay his game?

I'm assuming the best way would be to record his/her keystrokes and read from a record of them rather than the keyboard when replaying. Everything else in the game would be the same. Is that the right approach?

Robert Kosek
08-10-2008, 02:39 PM
You also need to store the random seed when the game starts, otherwise everything will be random each replay. ;)

JernejL
08-10-2008, 04:36 PM
you store input per frame, also your game must be totally predictive and run at fixed frame rate.

NecroDOME
10-10-2008, 03:33 PM
Yup. Using key-strokes is the less-data-consuming.

But the synchronization needs to be perfect, and yes, the game update must run on a fixed frame rate so its easy to reproduce.