by tlaero » Wed, 17Dec27 04:04
Do you just want to roll back a page, or do you want to undo any state changes as well? For instance, say the player gets a point on one page and then goes back and does it again. Does he get two points, or do you only want him to get one?
If the latter, I would set up an automatic save slot and stick a save game to that save slot in the PostLoad. Then the back button just restores the automatic save slot. That will let you go back once, but won't let you go back multiple steps. Since some browsers use cookies for the save, there's not enough space to do a full undo stack. If you want that, you'll have an easier time with Renpy, where that functionality is built in.
I personally feel that "back" funtionality isn't very necessary when users have an easy quicksave and multiple save slots. If they get to a spot where they want to try all of the possiblities, they'll just save it and try them. In GtkC, I had a checkpoint system where I automatically saved at certain spots so that users could go back if they failed. When in the next game I implemented an actual "save when you want" button, everyone liked it better.
Tlaero