Upcoming ChoiceScript Feature: Checkpoints

I have another question, a vague, open-ended question, for anybody who’s reading this far down the thread.

I’d intended *save_checkpoint and *restore_checkpoint to primarily help with end-of-chapter checkpoints, to simply restart the current chapter, if the player wants to.

But I also introduced checkpoint “slots,” and I’m wondering what people think they want to do with them.

In my OP, I gave an example of *save_checkpoint major and *save_checkpoint minor. In this post I gave an example of setting one checkpoint per chapter, so you could *restore_checkpoint chapter1, *restore_checkpoint chapter2, etc.

But there are a lot of ways that games can be saved. There’s some overlap and some differences between the CoG-only *save_game command and the smPlugin that many games use on Dashingdon.

The *save_game command:

  • Stores saves on our servers at choiceofgames.com (that’s why Dashingdon games can’t use them)
  • Only lets you save when/where the author includes a *save_game command
  • Only lets you restore when/where the author includes a *restore_game command.
  • Doesn’t let you save in the middle of a file (you have to specify a “destination file” in the *save_game command, e.g. *save_game chapter2)
  • Lets players name their slots
  • Allows authors to detect when you just restored, with the choice_user_restored variable

The smPlugin:

  • Stores saves in your browser’s local storage. (Those saves can be lost, or can fill up all of the “quota” that your browser allows Dashingdon to have. The quota is especially small on Firefox, FYI!)
  • Lets players save at any time, in the middle of a file, whenever
  • Lets players restore at any time
  • Doesn’t allow the game to detect when you’ve used it (as far as I know)

*save_checkpoint:

  • Stores saves in your browser’s local storage
  • Only lets you save when/where the author includes a *save_checkpoint command
  • Only lets you restore when/where the author includes a *restore_checkpoint command (but you can put it on a stats screen).
  • Supports excluding some variables from restoring
  • Allows authors to detect when you just restored, using the choice_just_restored_checkpoint variable

Then there’s just “not losing your progress when you refresh the page.” That doesn’t have an official name, but I’ve always called that feature “autosave.” Autosave is a built-in feature of ChoiceScript, but Dashingdon has never turned it on for some reason. (It always stores your current state in your browser’s local storage.)

I might be able to make *save_game work with just local storage, especially if Dashingdon were to turn on autosave. Would very many authors bother to use *save_game, given that smPlugin is already there and already works?

If you could only have just one, would you prefer *save_game, *save_checkpoint, or smPlugin?

(Also, do checkpoints even matter that much if they don’t work on Dashingdon? I don’t think Dashingdon has incorporated any of the CS updates from last year, including *create_array from Sep 2022, say nothing of keyboard shortcuts and disabling touch-slide controls from June 2023.)

The absolute worst case scenario for me would be for people to try to recreate *save_game using *save_checkpoint slots.

It would look something like this monstrosity, click here to see it
*label save
Which slot do you want to save?
*input_number slot 1 3
What do you want to call your saved game?
*input_text save_name[slot]
*if slot = 1
    *save_checkpoint slot1
    *return
*if slot = 2
    *save_checkpoint slot2
    *return
*if slot = 3
    *save_checkpoint slot3
    *return

*label restore
*choice
    #Slot 1: ${save_name_1}
        *restore_checkpoint slot1
    #Slot 2: ${save_name_2}
        *restore_checkpoint slot2
    #Slot 3: ${save_name_3}
        *restore_checkpoint slot3
    #Cancel
        *return

The problem with this code isn’t that you can’t do it… you can. But it’s kinda like implementing a checkpoint system from scratch by copying and pasting all of your stats into backup stats. It’s a big waste of your time, and I’d like to stop doing that!

But, if that’s what everybody wants to do, then I should probably just work on making *save_game work on Dashingdon, right?

6 Likes