Checkpoint/Saving system

If you’re thinking of checkpoints, you can autosave using CJW’s awesome plugin. You can code in checkpoints and the player can just load it up when they die.

If you are thinking of a save system to port the stats between WiP updates, I recently did up a PlayerCode system, you can check out my code on dashingdon!


I’m afraid I don’t want the kind of a system you’re suggesting, the player code, I’m looking for an actual checkpoint system, thanks for the suggestion though.
Never heard of the plugin, could you link it? I also avoid using plugins, so, I hope it’s an easy-to-use one.

Well, the simplest (most basic) solution is just as what @Carlos.R said:

  1. Create a “hub” scene where your player will go if their die. This scene will contain #Load_latest_checkpoint and #Restart options (or whatever you like)
  2. Make a copy of all of your *create variables
  3. Rename those copies as, for example, *create [var]save
  4. Each time player reach a checkpoint, save those [variables] into [var]save
  5. If the player dies and are sent to the “hub,” the #Load_checkpoint will load [variables] with [var]save

As for @nauhziy’s system, go to his WIP thread.
I personally shy away from it though. My brain can’t handle the enigma :laughing:


Well, not really looking for what @nauhziy said. Just a simple checkpoint system. I got the point, I think, the variables just reverse.

1 Like

I think CJW’s save plugin will be much better for your purpose. Its super easy to use too.

Type this to initialise the plugin:
*sm_init mygame | 3

Then this when you want to do an autosave/checkpoint.
*sm_save 0 | false |

Then when you check the CJW save plugin on dashingdon when you upload your WiP. Thing is, it doesn’t work offline so like you need to comment it out during your tests.

What @Szaal said works too!


Psst. It actually does work offline.
But you’ll have to edit your index.html and paste additional files to make it work, though, which can be daunting for coding-newbie. :frowning::raised_back_of_hand:t4:

The file can be found at a link around this thread.



I’ll stick with the basic checkpoint system because I didn’t fully understand how to use the plugin.

1 Like

I created a checkpoint save for tokyo wizard, as described above (basically saving all variables…). It takes some effort if you have lots of variables, but def posible


Likewise, I had created my own checkpoint save system for Monsters, though I am rotating that out in favor of CJW’s plugin. Benefits for each, as I see them: Checkpoint: Keeps players from save-scumming if that matters in the game, makes for potentially more ‘weight’ to choices. CJW plugin: Allows saving at any time, much easier than creating one’s own if there are many variables in a game.


Also, Hosted Games can be published with checkpoint systems, but not with @CJW’s save plugin, correct? So that might be something to consider.

@N1GHTMAR3 If you’re hosting on Dashingdon, then @Dashingdon’s set up the website so that all you have to do is click the box that says ‘enable CJW’s save plugin’ on the ‘Edit Game Details’ page, like so:

Then put *sm_init mygame | 3 (or however many save slots you want) at the end of your *creates in startup.txt. I usually just *comment that line out when I’m playtesting or using Quicktest and Randomtest, or it causes an error. Then I unhide it when I upload my files.

This will allow players to save anywhere, not just at checkpoints. That might be helpful for regular testers anyway, since they often play through the same sections a number of times to get to new content.


Fiogan makes a point.

I suppose there’s always the option of doing both. Weird as that sounds, I think it would gain the benefits of both, during the WIP stage. Allowing testers to find route-oriented bugs easier, and not needing to replay segments so many times. While also allowing the custom system to be tested.


I think that in the line *sm_init mygame | 3 the ‘mygame’ parameter should be changed to a suitable (hopefully unique) name for your game so that it does not conflict with other in-browser saves for other games. Also (as @Fiogan mentioned) the ‘3’ can be changed to however many save slots you would like to be available for the reader/player, but in most cases 3 slots is sufficient.


Correct, definitely don’t leave it as ‘mygame’! Try and make this as unique as possible.


Does “kljdvbaewiuh” unique enough?


What I would do is isolate the checkpoint through the part where the player is no longer at a risk of dying into one chapter.
ie. (chapter start) *label checkpoint
… … …
(chapter end) *finish

make a *temp variable for every variable that can be changed in the chapter (ie if only the player’s health and ammo and speed stats are changed, then you would create 3 temps, one for each)
Then you set the temps to the variables at the start and if the player dies, goto the beginning, replace the real variables with the temp ones, and start again.

This is how you would label it:
*temp ammotemp ammo
*temp healthtemp health
*temp speedtemp speed
*label checkpoint
*set ammo ammotemp
*set health healthtemp
*set speed speed temp
[put chapter here]
(when the chapter is finished the player should be safe and move on to either another checkpoint or whatever.)

Edit: If you are going to have several checkpoints and possible deaths, you could use normal variables instead of temp.

1 Like

Hmm, thanks for the suggestion!
Though, I think I won’t be using that, thank you, still.

I would HIGHLY suggest this solution:

Edit: I just realized I was the last person to suggest something and man did I go small back then. Silly 18-days younger me.


Thank you. I was thinking, what everyone suggested would work with the stat variables, but couldn’t really help with the inventory system. Either way, I will try it out, I am working on a closed project right now, so the save system isn’t a high priority right now. Again, thank you though. :smile:

1 Like

Perhaps a *go_sub would benefit from this.

Creating a .txt file where all the variables are transposed might translate to a little elbow grease, but would pay off in the future with just a ‘*gosub checkpoint’ command at the beginning of selected scenes.

P.S. I apologise if I’m reviving a dead topic (last response was in July, but the forum showed me a ‘New/Updated topic’ and here I am, contributing to the internet.).

1 Like