Commit

240ad71

Here’s how I built netplay replays in Rebit 🎮 Each recording stores the initial emulator state, ROM hash, emulator build/protocol info, and player input changes tied to frame numbers. During the match, those inputs upload in chunks. Each chunk has a start/end frame, so playback can check that it continues where the previous chunk stopped. To play it back, the client restores the initial state and feeds the recorded inputs into the emulator frame by frame. The emulator generates the gameplay again. At the end, I compare the emulator’s state hash with the recorded final hash to catch desyncs. Partial recordings without a final hash stay marked as unverified. One tradeoff: seeking currently restores the starting state and simulates forward to the target frame. That means jumping deep into a long match takes more work. Periodic snapshots are a possible next improvement. Anyone building emulator replays—how are you balancing snapshot size against seek speed?

commit 240ad71