5 ms·
Exactly: 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 th
by jblow 11y ago
Exactly: 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?