Save System: Concept for "saves per level"
Posted: Mon May 30, 2022 1:00 am
This is something I have a solution for but I'm bouncing this off the forum to check if someone has a better solution.
My game has not a sidescroller- or FPS-like level progression where the player starts somewhere and then moves from level 1 to 2 to 3, etc. - but instead I have a bunch of levels that a player can play independently. Something like RTS games where you pick a map to play.
So I need not a list of save games by date, but by level. In fact, I only want one save game per level - players should be able to continue a game, but I don't allow saving, trying, reloading, etc.
So what I did was keep a list, give each level an ID and hardcode the save system slot to the level ID. This works. If I know the level ID, I an check if there is a save game and I can load it.
It also can fail if I don't get the ID correct, so obviously the system isn't perfect. And it leaves empty slots scattered around, which is only a problem in the meta file, but it prevents me from using numbering like "all easy levels are in the 100 - 199 range, all difficult levels in the 200 - 299 range".
So maybe there's a better way and I've missed it?
My game has not a sidescroller- or FPS-like level progression where the player starts somewhere and then moves from level 1 to 2 to 3, etc. - but instead I have a bunch of levels that a player can play independently. Something like RTS games where you pick a map to play.
So I need not a list of save games by date, but by level. In fact, I only want one save game per level - players should be able to continue a game, but I don't allow saving, trying, reloading, etc.
So what I did was keep a list, give each level an ID and hardcode the save system slot to the level ID. This works. If I know the level ID, I an check if there is a save game and I can load it.
It also can fail if I don't get the ID correct, so obviously the system isn't perfect. And it leaves empty slots scattered around, which is only a problem in the meta file, but it prevents me from using numbering like "all easy levels are in the 100 - 199 range, all difficult levels in the 200 - 299 range".
So maybe there's a better way and I've missed it?