Skip to content

If two entities reference the same component, then when encoded and decoded identity must be preserved #14

@alecmce

Description

@alecmce

In a scenario where entity A and B share a component World:

world = new World();
entityA.addComponent(world);
entityB.addComponent(world);

then you encode

encodedA = encoder.encode(entityA);
encodedB = encoder.encode(entityB);

then you decode

entityA = decoder.decode(encodedA);
entityB = decoder.decode(encodedB);

unfortunately

trace(entityA.getComponent(World) == entityB.getComponent(World)) // outputs false

boo!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions