3 ms·
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
by rkowalick 16y ago
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.
- WalterGR 16y agoThat'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?
- mcbarry 16y agoIf 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.