Skip to content

There is a generic way to save and load the game #30

@coeing

Description

@coeing

As we hold all our data inside the components, we basically just have to serialize the entity manager.

First you should serialize all entities with their id and the blueprint they were created from.

Than get all entities from the entity manager. For each entity:

  1. Get all properties of their components that may change during runtime
  2. Store those properties in an attribute table
  3. Serialize the property table with the entity id as a key

When deserializing:

  1. Create all entities with their former ids
  2. For each entity
  • Deserialize the attribute table if it exists
  • Init the enity from its blueprint and the attribute table (if it exists)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions