Whimsy

Using checkpoints and savegames

Whimsy provides two complementary ways to save game progress: checkpoints and savegames. Understanding when and how to use each will help you create a better experience for your players, especially for longer games or games with a fail state.

Manual Savegames

Savegames allow players to manually save their progress and return to it later. They're stored in the browser's local storage. Usually, a player can open the game menu by pressing a menu button in the controls pane, and select to which slot they want to save a game. Later, they can load from that save slot.

Opening the game menu

Every game has three save slots, and also an additional automatic save slot that is written to every time a hero moves to a new stage.

Four save slots in the load menu

Note

Players can only save their game when there is no dialogues or other UI messages on the screen. This is made to prevent saving in the middle of important scenarios, as they will not be continued on game load.

Tip

You can change text labels in the game menu by going to the Settings tab and writing your own in the "Translations" section.

Opening the save/load menus from a script

Sometimes you will want to strongly encourage users to save their game, or to open the Load menu from a script. You can do this by these scenario blocks:

  1. Show save menu - Prompts the player to save their game.
  2. Show load menu - Prompts the player to load a previously saved game.

Giving a player a choice to restart a game or load from a save

Checkpoints

Checkpoints are automatic save points that are controlled by your game's scenarios. Unlike manual savegames, checkpoints are invisible to players and are managed entirely by your game's logic.

How to Use Checkpoints

Checkpoints can be created, loaded, and managed through specific scenario blocks:

  1. Save a checkpoint - Creates a snapshot of the current game state
  2. Load a checkpoint - Returns the game to the last saved checkpoint
  3. Clear the checkpoint - Removes the current checkpoint
  4. Is there a checkpoint? - Checks if a checkpoint exists
Warning

You must make sure that there is a valid checkpoint before trying to load it, or it will throw an error. You can use "Is there a checkpoint" block with a "Branch", or make sure that there is always one before you need to load it through other means, like with invisible actors-triggers that save the game when stepped on and that are strategically positioned before hazards.

You can make an Actor that works like a reset button for a puzzle with this simple setup that uses checkpoints and a Yes/No question on touch event:

Simple setup for a checkpoint-based reset Actor

You can also display a menu with the "Ask for a choice" block that offers to load the game when a hero was defeated. You can prompt to open the Load menu here, too:

A simple game over menu

On signal?

This example shows just the menu part and requires the Gameover signal to be sent with the "Send signal" block in the same Stage. You can read more about what signals are in its dedicated page.

Which data is saved

Both checkpoints and savegames save this information:

  • Current stage and hero position.
  • Hero's current skin.
  • Variables and their values.
  • All actors' position, visibility, and their presence in the game. (If an actor was destroyed before a save, it will be absent after loading.)
  • State of such blocks as "Run one in a list"
Tip

Each savegame remembers its own checkpoint, so players who save manually will still have access to their checkpoint when they reload.

Handling changed worlds

After you expand your game, the snapshot of the world in an older save may be incompatible with what you have now. For example, if you save, change the layout of a Stage so that a door actor is placed elsewhere, and then load the game, the door will be on the old spot, potentially blocking players from proceeding if there is a wall under that actor.

Whimsy will reset new variables to default state, however.

In most cases, after big updates, you can reset game's ID in the Settings tab. This will change where savegames are stored, thus making all saves disappear.

When to Use Which System

Use Checkpoints When:

  • You want to create an invisible autosave functionality;
  • You need to mark safe points before difficult sections;
  • You want to implement a retry/respawn system;
  • You need to save state without player intervention.

Prompt Players to Use Manual Savegames When:

  • You want to give them control over when they save;
  • Your game has multiple paths or endings players might want to revisit;
  • Players might want to continue their game across multiple sessions;
  • You're creating a longer game where progress preservation is important.

Combining Both Systems

For best results, consider using both systems together:

  • Use checkpoints for safety and automatic progress tracking.
  • Let players know when they've reached a good point to save. Offer manual saves at key points through the "Show load menu" block.
  • Include information on how to save and load a game manually on your game page's description.

Remember that checkpoints are cleared when a game ends or restarts, while manual saves persist. (Until the browser storage is cleared, if to be pedantic.)

By thoughtfully implementing both systems, you can create a player-friendly save system that balances convenience and challenge in your Whimsy game.