Makinom handles saving and loading the game for you.
Saving the player’s progress is mandatory for most games. Makinom includes a complete save game system that will save and load game data. Save games can either be saved actively by the player selecting a save game file, or by using Auto Save Slots to automatically save the progress to a previously selected slot.
The save game system can be expanded to save custom data (e.g. from 3rd party products) with the regular save data by adding Custom Save Data.
Using Save Games #
The save game system is accessed through schematics. Saving, loading and displaying save game menus is handled by nodes (found in Add Node > Game > Save Game).
The settings for the save game systems can be found in the Makinom editor in UI > Save Game Settings.
What will be saved #
The save game system can save the following data in a save game:
- Game Time
The current game time.
The game time is the time since the player started a New Game, i.e. using a Start Game node. - Player Position
The current scene, position and rotation of the player.
The position and rotation can only be saved when a player is set.
Respawning the player when loading the game is only possible when you’ve defined a player prefab in the Makinom editor (Game > Game Settings). - Music
The currently playing music and track position. - Block States
The currently blocked input keys and HUDs. - Variables
The global and object variables (non-local).
You can optionally exclude defined variable keys from being saved, or only save defined variable keys. - Terrain Changes
Changes made to terrains (via schematics) can also be saved with save games.
Please note that this’ll dramatically increase the size of a save game.
All data is saved optionally, i.e. you can enable/disable which data should be saved in the Makinom editor. By default, everything will be saved (except terrain changes).
Save games don’t save the current state of the scene (e..g positions of all game objects, spawned prefabs, etc.) or running machines/schematics.
Saving #
Save games are stored as XML-formatted text and can optionally be encrypted.
Save File Locations #
Save games can be stored in different locataions.
The location of files and PlayerPrefs vary based on the operating system and the company/game name you’ve defined in Unity. E.g. in Windows, the files are stored in sub-folders of the user’s folder and the PlayerPrefs are stored in the registry.
You can also create custom save file handling by deriving your class from BaseSaveGameFileHandler, e.g. if you want to implement save games for a game console.
Custom #
Uses a custom save game solution using static functions to save, load and delete save games.
Data Path #
Save games are stored as files in Application.dataPath.
Persistent Data Path #
Save games are stored as files in Application.persistentDataPath.
PlayerPrefs #
Save games are stored in Unity’s PlayerPrefs.
Save Menu #
The player can actively save the game by using a Save Game Menu node displaying the Save menu type. The save menu will display a list of available save game files the player can save to.
The save menu and number of available save game files are defined in the save game settings.
Auto Save Slots #
You can automatically save the game by using an Auto Save node. The auto save node will automatically save to the current auto save slot or store the save game as Retry save data. A retry save game will only be available while the application is running. Once the player closes the game, the retry save game will be gone.
Using Auto Save Slots still requires to actively save the game, e.g. via schematics used by an interaction (like a save point) or by passing through a checkpoint (e.g. using a Trigger Machine).
The player can optionally select an auto save slot that should be used using the Auto Save Slot Dialogue node. This allows multiple players to use auto saving without overriding each other’s save games.
The number of available auto save slots are defined in the save game settings.
Loading #
The player can load the game when a save game is available or retry data has been saved.
Load Menu #
The player can actively load the game by using a Save Game Menu node displaying the Load menu type. The load menu will display a list of available save games (including auto save slots).
The load menu is defined in the save game settings.
Auto Load #
Loading the game using an Auto Load node will load the save game stored in the current auto save slot or retry save game (if available) without the player selecting a file.
This can be used to e.g. automatically return to the last auto save upon game over or adding a Continue option in a start game menu (e.g. via Show Dialogue node).
Custom Save Data #
Makinom allows you to add custom save data to the save game system.
Add custom save data (e.g. 3rd party product data) to Makinom save games by registering a class (e.g. a component) to the save game system. The class must implement the ISaveData interface.
Learn more about this in the custom save data documentation.