Entity ID’s: how big, using UUIDs or not, why, etc?

This has come up a few times, and I ended up replying on Twitter:

But that’s a crappy way to find things later, so I made a quick-and-dirty infographic with a few key points:


I’m working on my own Entity System; want to follow it?

Support me on Patreon, writing about Entity Systems and sharing tech demos and code examples

2 thoughts on “Entity ID’s: how big, using UUIDs or not, why, etc?

  1. Tom H.

    What’s the practical difference between 16b EID + 10b version# and just 26b EID?

  2. adam

    Depends how many partitions you need for your data.

    Some people use some of their bits to indicate e.g. groups of entities for culling.

    For performance reasons, it can help to indicate similarity of “components I expect this entity to accumulate” (enables the component store to aggressively clump those entities’ components together in memory).


    I’m merely pointing out that even with 32bits, in many games you may not need the full 32bits for local indexing, and could split the bits into more useful sub-counters.

    (and/or you could re-map them a second layer internally within a given system, e.g. a particle system)

Leave a Reply

Your email address will not be published. Required fields are marked *