Optimized Save System for Game Structures and Player Data

I am currently developing a save system where, upon creating and launching a save, the system loads a specific location (or map). In this location, certain information needs to be saved, such as:

  • Structures: Whether they are intact or destroyed.
  • Player Data: Ongoing tasks and completed tasks.

When the player re-enters the save, I would like the system to restore the state of both the structures and the player data. This is similar to how it works in games like Pokémon, where you save, quit, and resume exactly where you left off.

However, I’m concerned that saving an entire map might not be optimal in terms of performance or storage efficiency. The same applies to saving individual structures. I’m currently researching how games like Pokémon handle this to implement a more efficient solution.

If you have any insights or suggestions on how to optimize this kind of save system, I would greatly appreciate your feedback. In the meantime, I will continue exploring potential solutions.

Best regards,
Lazxr

1 Like

If the buildings have different “levels” of destruction, then you can store that information instead. For example, let’s say you have 3 buildings:

Bulding1
Building2
Building3

Rather than storing each part of model state, you store a small amount of information stating the overal state of the building, for example:

Building1 → “normal”
Building2 → “partially_destroyed”
Building3 → “fully_destroyed”

And so on. Using this, you can store each building’s name in a table with it’s state upon saving. It will seem like a lot of data, but in reality, it’s actually not.

The same goes with the Player’s tasks. You save all the tasks that they have completed (perhaps give each task an ID - that way you only store a small number for each completed task). Then for the ongoing tasks, you do the same, but include slightly more information indicating what has and hasn’t been completed in the task.