I was kind of curious as to how replay might be implemented in a game.
Initially, I thought that there would be just a command list of every player/ai action that was t
There are two major methods:
It depends on what you want to do. Sometimes storing events is better, because this takes usually much less memory. On the other side if you want to provide replays which can be played at different speeds and from different starting points, it is better to store states. When storing states you can also decide whether store them after every event or f.e. only 12 or 25 times per second -- this might reduce size of your replay and make it easier to rewind/fast forward them.
Note that "state" does not mean graphical state. More something like unit positions, state of resources and so on. Things like graphics, particle systems and so on is usually deterministic and can be stored as "animation X, time Y:Z".
Sometimes replays are used as anticheating scheme. Then storing events is probably the best here.