Savegame Spec - Lithumist/PelletQuest GitHub Wiki
There will be 3 savegame slots. Savegames will be stored in the following locations:
- saves/slot1/
- saves/slot2/
- saves/slot3/
In each slot folder, there will be a data.ini file that holds all global save information.
In addition to the data file. There will a .txt file for every map the player has currently explored. The format for this file is: pellet_<MAP_NAME>.txt
. More on this below.
- On a map change, a save occurs. This means the game auto-saves as you go along.
- On player death the current map resets and a life is lost. (Note that pellets do not change)
- In the game world there will be 'checkpoints' The player can trigger these to set it as the active checkpoint. If the player dies and has no lives, the player respawns next to the checkpoint.
- When the game is loaded from the menu the player starts at his active checkpoint.
Pellet .txt files represent each tile in a map as a number, either 1 or 0.
- 0 indicates no pellet on the tile
- 1 indicates a pellet on the tile
When the player enters map that he hasn't enterd before:
- An entry is created in data.ini for that map.
- A pellet .txt file is generated for that map (pellets in every empty player-walkable tile)
If the player has already entered the map beofre, it's pellet .txt file is loaded.
When the player exits a map:
- data.ini is updated with any new stats
- The pellet .txt file is rewritten with the new pellet values