Jump to content


Tutorial: Adding Instant Replays to Your Game


5 replies to this topic

#1 sheft

    New Member

  • Members
  • Pip
  • 3 posts

Posted 10 November 2011 - 08:53 AM

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.

#2 geon

    Senior Member

  • Members
  • PipPipPipPip
  • 939 posts

Posted 10 November 2011 - 06:03 PM

Nice. I read a similar tutorial in 2004: http://www.gamasutra...play_system.php

#3 Stainless

    Member

  • Members
  • PipPipPipPip
  • 610 posts
  • LocationSouthampton

Posted 10 November 2011 - 06:52 PM

Add run length compression to improve the storage use.

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

#4 sheft

    New Member

  • Members
  • Pip
  • 3 posts

Posted 10 November 2011 - 07:02 PM

Stainless said:

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

#5 sheft

    New Member

  • Members
  • Pip
  • 3 posts

Posted 10 November 2011 - 07:24 PM

geon said:

Nice. I read a similar tutorial in 2004: http://www.gamasutra...play_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.

#6 }:+()___ (Smile)

    Member

  • Members
  • PipPipPip
  • 169 posts

Posted 10 November 2011 - 08:42 PM

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).
Sorry my broken english!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users