Tutorial: Adding Instant Replays to Your Game

5f47634721b42d0ae56be30cd350a72f
0
sheft 101 Nov 10, 2011 at 08:53

I recently posted this tutorial on my blog. It’s essentially the methodology behind recording instant replays in a game. This technique has been used in Starcraft, and a more advanced implementation was used to manipulate time in Braid.

Any feedback is appreciated! This is a brand new blog and it’s still under construction.

5 Replies

Please log in or register to post a reply.

820ce9018b365a6aeba6e23847f17eda
0
geon 101 Nov 10, 2011 at 18:03
B5262118b588a5a420230bfbef4a2cdf
0
Stainless 151 Nov 10, 2011 at 18:52

Add run length compression to improve the storage use.

Instead of storing left * 20 , store two bytes left 20

5f47634721b42d0ae56be30cd350a72f
0
sheft 101 Nov 10, 2011 at 19:02

@Stainless

Add run length compression to improve the storage use. Instead of storing left * 20 , store two bytes left 20

That’s something I thought of while writing the tutorial, but I decided to only go over the basics in the first post. I’ll probably discuss that in a followup post at some point

5f47634721b42d0ae56be30cd350a72f
0
sheft 101 Nov 10, 2011 at 19:24

@geon

Nice. I read a similar tutorial in 2004: http://www.gamasutra.com/view/feature/2029/developing_your_own_replay_system.php

That’s interesting. I think he might have overcomplicated it with determinism and non-determinism, though. In my experience, you can consider everything deterministic, and get reliable results.

6eaf0e08fe36b2c23ca096562dd7a8b7
0
__________Smile_ 101 Nov 10, 2011 at 20:42

Problem with determinism arises when you’re using floats in your code and going multiplatform. I think it’s nearly impossible to make a third-party physics library to work bitwise exact on different platforms.

So making game deterministic is the most important and the hardest step for replays (and also efficient multiplayer).