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.
Add run length compression to improve the storage use.
Instead of storing left * 20 , store two bytes left 20
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
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.
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).