Diodor
09-26-2002, 02:09 AM
This thread is about error checking, logging, error reporting and other debugging / betatest info gathering methods.
Personally, I love assert/verify custom made macros that report an error and shut down the game smoothly, and I use them liberally (they were life savers back in the fullscreen-exclusive DirectDraw days).
Just yesterday I've coded a record/replay module for my logic game collection. It's quite simple, it mostly captures every message in the main game loop (I use SDL, but I imagine everything would work just as well with a Win32 message pump) and writes it to a record file. There are some issues with syncronising the AI thread, forbidding or recording srand calls, recording the delays I use to keep the FPS constant, but nothing that can't be worked out. To replay I simply use a different main loop that reads messages from the record file instead of the SDL messages (I pay attention to MOUSE_MOVE messages and move the mouse appropriately). Surprisingly, the record file size is quite small (notwithstanding that it can be further shrinked a lot).
The result is perfect recording, to the point that most bugs are captured in the replay (those that aren't machine dependent anyway). I can't wait to add features such as changing the speed of the replay, or an edit box to allow the betatesters to write comments about the game as they play.
Personally, I love assert/verify custom made macros that report an error and shut down the game smoothly, and I use them liberally (they were life savers back in the fullscreen-exclusive DirectDraw days).
Just yesterday I've coded a record/replay module for my logic game collection. It's quite simple, it mostly captures every message in the main game loop (I use SDL, but I imagine everything would work just as well with a Win32 message pump) and writes it to a record file. There are some issues with syncronising the AI thread, forbidding or recording srand calls, recording the delays I use to keep the FPS constant, but nothing that can't be worked out. To replay I simply use a different main loop that reads messages from the record file instead of the SDL messages (I pay attention to MOUSE_MOVE messages and move the mouse appropriately). Surprisingly, the record file size is quite small (notwithstanding that it can be further shrinked a lot).
The result is perfect recording, to the point that most bugs are captured in the replay (those that aren't machine dependent anyway). I can't wait to add features such as changing the speed of the replay, or an edit box to allow the betatesters to write comments about the game as they play.