Unreal Engine Mass Framework

Entities, fragments and archetypes, and where the data actually lives.

Mass is Unreal Engine's data-oriented framework for simulating a lot of things at once: crowds, traffic, flocks, anything where you have thousands of agents and one Actor each would be far too expensive.

The model is entity component system. We refer to an entity through an 8 byte handle, and Mass keeps additional storage to track that entity and validate the handle. Gameplay data lives in fragments, which are plain trivially copyable structs, and the exact set of fragments an entity has defines its archetype. Entities that share an archetype are stored together in chunks of parallel arrays, and that is where the speed comes from: processors walk tightly packed memory instead of chasing pointers around the heap.

Epic's reference is Overview of Mass Entity in Unreal Engine.

Understanding Entities and Fragments in Unreal Engine's Mass Framework

Understanding Entities and Fragments in Unreal Engine's Mass Framework

The entity handle in Mass is 8 bytes. Mass also stores the information needed to track the entity, plus its fragment data.