News for hackers. Stuff that matters.
Re:Conceptually, how does replay work in a game? by rkowalick on Sunday June 20, 2010 @07:13PM (#1447386)
One of the neatest ways replays are implemented is in MAME (Multiple Arcade Machine Emulator). The replay is recorded by just recording all of the inputs given to the emulator during the course of the game. Since the entire system is deterministic, you can watch a replay by having MAME just play back the game with the inputs stored in the file.
Re:Conceptually, how does replay work in a game? by WalterGR on Sunday June 20, 2010 @08:42PM (#1447537)
That's cool.

I take it the inputs are recorded with tick-level accuracy? Otherwise rand(time()) would screw everything up.

Is that all there is to it, or am I missing something?

Re:Conceptually, how does replay work in a game? by mcbarry on Sunday June 20, 2010 @09:16PM (#1447594)
If it's anything like SNES/Genesis/other console emulators, the only entropy source is player input. I can't imagine many arcade machines would have a true persistant clock, and even then you could just store the start time as part of the replay data to ensure you get the same output for rand(time()) each time.