Original Post
I've been thinking over creating such a system and I'm not sure I have the best solution. I'm essentially torn between a centralised & modular system. The first has a "replay saver", which knows what types of data are saved and exposes an API for the game modules to call and a "replay loader", which reads from the file and calls existing APIs to simulate actions being performed. The modular approach means each game system has a ReplayPlayer, registered with a central file reader. The central reader gets a line from the file, determines the registered ReplayPlayer to use, and passes the data... the module then internally figures out how to handle the replay data. While the second approach seems more like proper engineering in some ways, it also could lead to many classes having their own replay code... making replays tightly coupled with the code-base instead of having a replay engine driving the application. Discuss...