4 ms·
Can you elaborate on the distinction between world state and events? As in, you don't capture user inputs but rather track all object positions and states at al
by Negative1 11y ago
Can you elaborate on the distinction between world state and events? As in, you don't capture user inputs but rather track all object positions and states at all times? seems very inefficient that way.
Also, big fan! Great work on the new language/compiler livecasts and can't wait for The Witness.
- jblow 11y agoExactly: I record the positions of all objects every frame (and other state variables), not the inputs that generated them. It is more expensive in terms of the amount of memory required, but it is much less expensive in terms of the amount of CPU required, and CPU was ultimately the biggest problem, so it seems I made the right decisions. Even on a limited-memory console like the Xbox 360 you can rewind most levels for 30-45 minutes before running out of buffer. That is more than anyone ever wants to do as a practical gameplay interaction. Working on The Witness... it will be done ... someday not too long from now.
- baddox 11y agoOut curiosity, what happens if you run out of buffer?
- nightpool 11y agoTheoretically, you probably just want to kick the stuff at the end out. (i.e. you lose the earliest state you can)
- seanmcdirmid 11y agoThat would be a cool game mechanic: you can freeze time and fine tune your behavior over a small window of the immediate past(e.g. the last two seconds), with the ability to see how the game changes over that window "strobe style." Sort of like Sherlock Holmes (in the movie where he thinks everything through "what if" style).
- fho 11y agoThat's basically the mechanic in the game Frozen Synapse: http://www.frozensynapse.com/ http://www.frozensynapse.com/ Every player plans their movements for the next fraction of a second and all turns get executed simultaneously.
- seanmcdirmid 11y agoI was thinking of a one player game against the computer, so the player can actually see what the computer will do according to their planned action.
- jblow 11y agoIn most worlds, the oldest state just gets thrown out; you keep playing as usual, it's just that if you were then to try and rewind all the way to the beginning, there would be a limit on how far you can go. In world 4, though, where you can walk to the beginning of time just by walking to the leftmost part of the level, I actually kick the player out of the level when there's no more memory. I have never heard of anyone noticing this.
- fnordsensei 11y agoDid you use deltas a la trie-based immutable data structures, or did you save the entire state every moment? Did you save frame by frame, or did you save ON the event, and then interpolate animations between the two states when reversing?
- frik 11y agoIt's efficient enough, given its a 2D plattform jump&run game. The developer wrote an extensive article how it works, it's really interesting, search for it. Game creator Jonathan Blow explains the rewind in a video (27min): http://www.youtube.com/watch?v=tSeYShR-OG0 http://www.youtube.com/watch?v=tSeYShR-OG0 And there is Gamasutra article about Rewind, in four parts: http://gamasutra.com/blogs/CameronLeBlanc/20130220/187036/Recreating_the_time_mechanics_of_Braid_Part_1.php http://gamasutra.com/blogs/CameronLeBlanc/20130220/187036/Re... and part 2-3: http://www.gamasutra.com/blogs/CameronLeBlanc/20130313/188444/Recreating_the_time_mechanics_of_Braid_Part_2.php http://www.gamasutra.com/blogs/CameronLeBlanc/20130313/18844...
- nightpool 11y agoYou're replying to jonathan blow ;) EDIT: to be clear, the GP of your comment is jblow, not the parent.