Tips for Input Recorders

This is part of a forum post I made. Classic Mike, going completely off topic and force feeding all the random advice I had saved up.

– – – –

Be sure your input update is written/recorded immediately before the game processes it. In other words, at the end your control interpretation code/handler. That way it can “in theory” reproduce a crash, instead of coming up a frame or two short. So if it doesn’t crash, then your crash is likely related to an uninitialized variable. So you forgot to set it in a function, initialize it to zero in the constructor, or set/handle a pointer. Hardware/Driver/Compiler problems are a possibility, but there’s an incredibly good chance it isn’t. Be wary of GCC the 3.0.x series though (anything newer is much more reliable, 3.1.x+, 4.x, …).

Compressed input recording is good for attract mode and in game replays, but not so much crash reproduction (especially if you’re waiting on changes before you write).

Prefer fixed framerates for internal clocking. This’ll make reproduction/playback of non rendering bugs/crashes easier.

Recording the initial random number seed is helpful too. And if you don’t reseed, you don’t need to record reseedings. It’s so very easy to do this too, it can essentially be your file header of an input recording file. Read and populate the seed first, then playback all the following input commands. Technically, you shouldn’t ever need to reseed, unless you’re making a multiplayer game.