The tooling here is next-level. Bret Victor would...
# linking-together
c
The tooling here is next-level. Bret Victor would be proud:

https://youtu.be/72y2EC5fkcE?si=MI2T1IME2SH3OCjp

😱 1
💯 2
i
Yeah this one slaps
c
There is frustratingly little detail about how it was built; I googled a bit, but couldn't find anything. It would be interesting to know how it was put together.
There's a little more detail in a response on their blog (https://tomorrowcorporation.com/posts/how-we-make-games-at-tomorrow-corp-our-custom-tools-tech-demo) "The act of going forward and back is not itself recorded – just the evolution of the game’s state. The snapshots happen according to 2 different schedules – a coarse grain schedule that records a new snapshot every so often based on time (we do every 2 minutes currently) and a fine grain limited set of snapshots that move around depending on where you are currently working on the timeline. That’s why the initial reverse debugger step causes a brief pause and then becomes fast – the first one seeks back to the most recent coarse grain snapshot, simulates forward creating fine grained snapshots that are exponentially spaced out backwards from your seek target, and then the subsequent steps will tend to have a snapshot that is right on the frame you need (or very close – unless you step back far enough to need to go create more snapshots but that is the rare case.) The state capture is mostly just a memcpy of the game’s heap (snapshots only happen on frame boundaries so the stack is never needed.) It for sure could be too big to keep as many snapshots as we currently do – that will just be game dependent. Something to use to calibrate what you expect is possible though is to remember that games like Metroid Prime, LOZ The Wind Waker, RE4, Mario Sunshine, etc. all ran on a system that basically had 24MB of RAM to use for your game. And it wasn’t just game state filling up that 24MB, it was your code and other read only resources – the kind of stuff that we don’t have to include in our snapshots. So while it’s true that this system is not a general purpose solution for any and all kinds of games, it’s also true that you can make some pretty incredible games with not a ton of actual game state. Yes in theory you could totally fork the timeline in the past and create a new session based off of the old one up to that point. That is a feature that I had in the reverse engineering debugger I made before this because it was good for creating what were basically tool assisted speed run videos for code coverage purposes. For our current system though it hasn’t been something that I thought we would actually use enough to justify spending the time to implement it. The code gen is totally custom but keep in mind that this toolchain only needs to run on our development platform which is Windows. To ship the finished game we will transpile the code to C and then compile it with the native toolchains on whatever platforms we’re targeting."
🍰 2
c
I made a toy time travel debugger for python that used a similar technique. You could run a much simpler simulation when calculating state forward from the snapshot because it didn't need to do any conditional tests. You could just save the series of mutations and reapply them. On a modern CPU it's very fast because there's no branch prediction failures.
j
This is really amazing! Great share