Concord
Concord copied to clipboard
Disable serialization for specific Entities
For some games you may not wish to serialize all Entities, since you may generate some of them when the game starts.
For this cases, disabling serialization of specific Entities is ideal.
There are two possible ways to go about this:
- Have an internal boolean on an Entity that can be toggled via methods to set whether the Entity should be serializable or not.
- Have a Component that is built into Concord and is given automatically for EVERY Entity, but may be removed by the user.
I'm gonna push for the second one because it has some other added benefits like being able to Filter serializable Entities. (It also aligns better with my proposal for #38)
I think @speakk has a possible PR for option 1?
Which most likely will have the correct logic in the World:serialize
function and may be reused even if we choose to go with option 2.
Here is my PR for option 1 https://github.com/Tjakka5/Concord/pull/41