save game system

Started by
2 comments, last by phil_t 8 years, 4 months ago

how do i make a save file system for a first person type game?

:)
Advertisement

Serialize everything that matters. Game state, various variables, everything. Just save it all, in a way that you can load it back of course.

Basically... anything with mutable data for your current game state, excluding things you want to reset, will need to be written to file to be loaded from later.

You can do this in many different ways, and the way it works is completely dependent on the game you're making. My custom engine is a CRPG with lots of persistant data. So I serialize things that do not show up on the maps first, then I serialize all dynamic elements of the map to override the next load.

You need to give more information about your game in order to get a good answer.

For a FPS with a checkpoint system (only save at checkpoints), it could be as simple as saving the player's stats/inventory, and which checkpoint you're at.

Or it could be as complicated as being able to serialize all game entities and being able to deserialize them to restore all game state exactly.

This topic is closed to new replies.

Advertisement