Hi! This is just a quick post to say that the ability to save and load your game's state is extremely useful for tracking down gameplay bugs. My engine has a lot of strange features, but the one that has proven to be the most useful by far is that it automatically records the last ~10 seconds of gameplay states in the background. So if I ever see anything strange happen while I'm playtesting my game I can pause, rewind to the point where it happened, and open the game in a debugger to see what caused the problem.
This post was inspired by a bug I just found with my game's bump attack system which only triggers if you attack one enemy, then try to attack a different enemy on the very first frame that you can act again, but that enemy decides to start stepping away from you on that exact same frame. All I had to do was see that my attack randomly didn't work, go "oh that's weird", then rewind to the frame where my attack was supposed to come out and step through it in a debugger. I don't know how I ever would have reproduced or fixed that issue without a feature like this.
I imagine it's difficult to add this feature to the game engines that most people use. So I don't talk about it much, in case I accidentally find myself getting dragged into a game engine argument. But if you have the ability to implement it, I really can't overstate how useful it is!
Also, if you use Live++ sometimes you can
- rewind to where the state is bad
- break in the debugger, find the issue
- fix it, live-recompile
- hit play on still-running game to confirm the fix

