explaingit

skypjack/entt

12,659C++Audience · developerComplexity · 3/5Setup · easy

TLDR

Header-only C++ library for game development using the Entity-Component-System pattern, keeping data and logic separate for faster performance. Used in production by Minecraft.

Mindmap

mindmap
  root((entt))
    What it does
      ECS pattern
      Data from logic
      Memory layout
    Core Features
      Runtime reflection
      Event signals
      Resource manager
      Task scheduler
    Tech Stack
      C++ 17
      Header only
      Package managers
    Audience
      Game developers
      C++ engineers
    Notable Uses
      Minecraft Mojang
      Performance apps
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Organize a game world's objects, data, and logic using the ECS pattern for better performance in a C++ game engine.

USE CASE 2

Add runtime reflection to a C++ application so code can inspect and manipulate objects without knowing their types at compile time.

USE CASE 3

Use the built-in signal and event system to decouple communication between different parts of a C++ game or application.

USE CASE 4

Manage resources and schedule tasks inside a C++ game without pulling in a full game engine.

Tech stack

C++C++17

Getting it running

Difficulty · easy Time to first run · 30min

Requires a C++17-compatible compiler, add the header to your project or install via vcpkg or Conan.

In plain English

EnTT is a C++ library designed primarily for game development. It implements a pattern called Entity-Component-System (ECS), which is a common way to structure game objects. In an ECS architecture, a game world is made up of entities (plain identifiers with no logic of their own), components (data attached to those entities, such as position, velocity, or health), and systems (code that processes all entities that have a certain combination of components). This separation of data from behavior tends to result in faster-running code because it keeps related data grouped together in memory. The library started as a focused ECS implementation and has grown into a broader toolkit. Beyond the core ECS, it includes a runtime reflection system (a way for code to inspect and manipulate objects at runtime without knowing their types at compile time), an event and signal system for communication between different parts of a program, resource management tools, a task scheduler, and several utility containers. The README describes these as added over time as the author wanted them for their own projects. One of the most cited facts about EnTT is that it is used in Minecraft, developed by Mojang. The README mentions this as a point of confidence in the library's stability and cross-platform reliability, since Minecraft runs on essentially every platform that exists. EnTT is a header-only library, meaning you do not compile it separately. You include the header file in your C++ project and it is ready to use. It requires a compiler that supports modern C++ (specifically C++17 or newer). Installation is available through common C++ package managers. The library is aimed at C++ developers working on games or other performance-sensitive applications where the ECS pattern is a good fit. It is not a game engine and does not handle graphics, audio, or input on its own. It is a foundational building block that handles the data and logic organization layer of a game, which other systems are then built on top of.

Copy-paste prompts

Prompt 1
Using the EnTT C++ library, write a minimal ECS setup with a Position component, a Velocity component, and a movement system that updates all entity positions each frame.
Prompt 2
I'm adding EnTT to my C++ game. Show me how to create entities, attach a Health component and a Damage component, and write a system that destroys entities when health reaches zero.
Prompt 3
Show me how to use EnTT's signal system to broadcast a PlayerDamaged event and subscribe to it from a separate audio system that plays a hurt sound.
Prompt 4
I want to use EnTT's resource manager to load and cache textures by string identifier. Write the resource loader class and show how to request and release a texture.
Prompt 5
Explain how EnTT's registry works and show me how to iterate all entities that have both a Renderable and a Transform component using a view.
Open on GitHub → Explain another repo

← skypjack on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.