Building Games in ECS with Entity Relationships

Created on 2024-03-28T13:31:52-05:00

Return to the Index

This card pertains to a resource available on the internet.

This card can also be read via Gemini.

Relationships allow you to attach a tuple of two entities to an entity.

You create an entity like "Carrer Group 1" and another entity like "BelongsTo," then you can relate individual units by adding the (BelongsTo, Carrier Group 1) relationship to them.

Relationships are treated as components with funny IDs and so it seems they cause new tables and type migrations to occur.

I don't like this setup. I think relationships should not cause type migrations, though it may still be necessary to update search indexes to find things that get changed.