💾 Save States: introducing ready-to-use, flexible "Save & Load" actions
The new "Save State" actions allow to save & load an entire game - or some part of it - using only a few actions.
By default, the save and load actions will save the full state of your game at any time — including all objects, variables, sounds, effects, and more. Saves can either be handled by GDevelop (which will save it on the device internal storage using the name you specify) or stored in a variable, giving you full control on where you store the content of this variable.
save-load-3d-demo.mp4
The Save State page of the documentation describes all the features of this new feature, including:
- Adding the "Save configuration" behavior to your objects to exclude some objects from the saves (typically, interface or visual controls should all be excluded to avoid them being moved when reloading a save)
- Excluding variables from being saved/loaded.
- Saving/loading from a variable.
- Using "profiles" to tag objects (or variables, or game/scene data) and only save/restore these.
👉 This new example shows how to use the actions.
save-load-demo.mov
The "Save & Load" actions are useful to do quick saves, long-term saves (for example, when a level is completed) or easily implement checkpoints (for example, save enemies/coins and restore them if the player dies and restart from the last checkpoint).
⚠️ While it will work in most cases, there are still a few limitations, notably saving of custom objects, and some objects/behaviors could have edges cases when restored from a save. The extension is tagged as Experimental while we gather feedback and improve it.
💝 Improvements
- Add "Pick Nearest" and "Rotate toward object" actions.
- UI improvements:
- Automatically scroll down the AI Panel when the AI is working
- Automatically close the object editor dialog when editing a variant.
- Save the selected layer in each scene so it is persisted across sessions (thanks @Digvijay-x1!)
- Save grid settings in variant editors
- Display both values and labels in selector properties
- Add a grace distance to Destroy Outside behavior to avoid deleting objects if they are never seen but near the camera
- Improved GDevelop documentation:
- Core features are now grouped by category, like extensions.
- Add collapsible blocks describing parameters of actions/conditions in the documentation.
🐛 Bug fixes
- Fix missing ability to select text when a fatal error is displayed on screen
- Fix instance sometimes not visible after being added by the AI
- Fix the link to the asynchronous function help page
- Fix aspect ratio being lost when hot-reloading 3D models
⚙️ Extensions
- [Reviewed] [Toggle switch] Add a condition to check if the switch is pressed or held outside
- [Experimental] [Screen orientation checker] Remove the background color property: the color can be set on the shape painter directly from the variant editor
- [Reviewed] [Multitouch joystick] Add a condition to check if a button was just pressed
- [Reviewed] [Star Rating Bar] Handle hot-reload
- [Experimental] [Height map] Handle hot-reload
- [Reviewed] [3D particles] Fix the rotation around X axis to be the other way
- [Reviewed] [Gamepads] Add a condition to check if a button was just pressed
- Also fix the "Gamepads count" and "Last pressed button" expression
🎨 Assets
- Fix orientation of multiple public 2D assets to face right by default
- Add pixel-art buttons, based on buttons by Kenney.nl
🕹 Examples
- Add Save and Load example using the new Save State feature
- A lot of new starter projects have been added
- [3D wall sliding] A 3D first person platformer with wall sliding (thanks @Boy1developer!)
🕹 Premium Game Templates
- Add a new 3D template: 3D chess game in local with AI, or 1v1 in multiplayer by @Jurfix
- Add a new game template: Scratch Lottery Ticket (Marketing game)
- Use this engaging game template for brand promotion, and customer engagement across interactive kiosks, mobile campaigns, and more.
🛠 Internal changes (for developers)
- Add internal flag allowing to disable entirely hitboxes of Spine objects to avoid unnecessary recomputations (thanks @danvervlad!)