# Continuous Action Memory

This topic is 2569 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I recently posted a quick tutorial on my blog about what I call Continuous Action Memory.

It's basically the methodology behind efficiently recording gameplay, so that you can watch a replay afterwards or do other cool things. It's the same technique that's used in Starcraft replays, and a more advanced implementation is used for time manipulation in Braid (best game ever). It's actually a really simple concept, and can be applied to most games.

By the way, the blog is brand new and still under construction (I'm coding it from scratch), so any kind of feedback on the website is welcome.

##### Share on other sites
Are you recording/replaying the input?

##### Share on other sites

Are you recording/replaying the input?

That's the most trivial form of it, which is what I covered in the tutorial. I may make another post later about more advanced implementations. It can get really complex when you try to do what Jonathan Blow did in Braid.

##### Share on other sites
Rewinding from time t given
- game state @ t
- input history from 0 to t
- forward time logic

without replaying from 0 to t beforehand is pretty interesting. (i.e. automatic computation of reverse time logic from forward time logic)

In SC2 you have to replay to t before rewinding from t.

##### Share on other sites
Interesting.

Live for Speed is another game that does a similar thing for it's replays - rather than store the position of the car throughout the replay, it just stores the user inputs. It then replays these inputs throught the physics engine and the car goes through exactly the same manoevers again. I imagine there's some pretty serious considerations to take into account when doing this though a complex (ie, where a tiny error could quickly multiply into a very large error) iterative physics engine.

##### Share on other sites

Interesting.

Live for Speed is another game that does a similar thing for it's replays - rather than store the position of the car throughout the replay, it just stores the user inputs. It then replays these inputs throught the physics engine and the car goes through exactly the same manoevers again. I imagine there's some pretty serious considerations to take into account when doing this though a complex (ie, where a tiny error could quickly multiply into a very large error) iterative physics engine.

It is a very sensitive system. As you said, even the tiniest amount of variance can quickly derail the whole thing. I addressed the two leading causes of that problem:

1. Variable frame rate, which must be accounted for when recording

2. Floating-point inaccuracy, which can be eliminated in multiple ways

Once I took care of those issues, I had perfectly identical playback, even on replays as long as 20 minutes.

1. 1
Rutin
37
2. 2
3. 3
4. 4
5. 5

• 11
• 15
• 12
• 14
• 9
• ### Forum Statistics

• Total Topics
633352
• Total Posts
3011483
• ### Who's Online (See full list)

There are no registered users currently online

×