Sign in to follow this  
Storyyeller

Replays and savestates

Recommended Posts

Storyyeller    215
My game has a reply system. While playing, it records every input. Since the game is deterministic, it can just play back the recorded input to create a replay.

The problem is that now I am adding a savestate feature to my game. Individually, the features work great. The problem is that it is impossible to record a meaningful replay when savestates are used. What can I do? So far the only thing I can think of is to create some sort of tree structure that branches off whenever a savestate is created, but this seems unnecessarily complex.

Share this post


Link to post
Share on other sites
JamesPenny    148
Simply record every action until the player dies, then discard it and start again. Only save the actions that get to the next checkpoint. That way the resulting video appears as one continuous playback instead of going forward then jumping back.

Share this post


Link to post
Share on other sites
Storyyeller    215
So what do you do about multiple savestates?

I suppose what you would end up with is a linked list of separate segments of the replay with each savestate containing a reference to the point where it starts.

Share this post


Link to post
Share on other sites
landlocked    103
Just save all inputs up to that point. If you start from a save, load the inputs and start appending to [i]that[/i] list and on the next save just put the combined lists into [i]that[/i] save. Make sense?

Share this post


Link to post
Share on other sites
Storyyeller    215
[quote name='landlocked' timestamp='1305925467' post='4813626']
Just save all inputs up to that point. If you start from a save, load the inputs and start appending to [i]that[/i] list and on the next save just put the combined lists into [i]that[/i] save. Make sense?
[/quote]

So you're suggesting copying the entire history with each savestate load? I suppose that is the simplest solution.It would take more memory, but I guess it shouldn't be a problem unless people play for hours and savestate frequently.

Share this post


Link to post
Share on other sites
landlocked    103
[quote name='Storyyeller' timestamp='1305925615' post='4813627']
So you're suggesting copying the entire history with each savestate load? I suppose that is the simplest solution.
[/quote]
Just to clarify: I'm not suggesting copying from all the saves just from the currently loaded save. Because if you think about it what are you going to do if a save file gets corrupted? You'd be stroked on trying to replay anything.

Share this post


Link to post
Share on other sites
SriLumpa    198
[quote name='Storyyeller' timestamp='1305918288' post='4813574']So far the only thing I can think of is to create some sort of tree structure that branches off whenever a savestate is created, but this seems unnecessarily complex.
[/quote]

Why do you think so ? It seems to map nicely to the reality. To me, it is doing something else that would be more complex :)

Share this post


Link to post
Share on other sites
BojanMati?    107
Why not keep the replay data only in memory and don't save that with the rest of the game?
Or is that what you are trying to avoid?

If so, and you fear that that moving the entire history every time a save/load is made could get very slow, how about only keeping the last 10/20/30 seconds of action in the replay and provide means to save individual replays?

Is your game an action/rpg or is it an rts like starcraft? How important is it that you have the entire replay all the time?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this