Concord icon indicating copy to clipboard operation
Concord copied to clipboard

Disable serialization for specific Entities

Open pablomayobre opened this issue 4 years ago • 2 comments

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:

  1. Have an internal boolean on an Entity that can be toggled via methods to set whether the Entity should be serializable or not.
  2. 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)

pablomayobre avatar Jan 08 '21 05:01 pablomayobre

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.

pablomayobre avatar Jan 08 '21 05:01 pablomayobre

Here is my PR for option 1 https://github.com/Tjakka5/Concord/pull/41

speakk avatar Jan 09 '21 10:01 speakk