Skip to main content

A modern ECS library for Roblox

Matter is an Entity-Component-System library that empowers developers to build games that are extensible, performant, and easy to debug.

Data-Driven Architecture

Data-Driven Architecture

With ECS, your data and your code are separate. Data exists as Components, any number of which can be present on an Entity. Systems contain your game code and run in a fixed order, every frame. Systems query for Entities that have specific Components, and declare what the state of the world should be.

The separation of state and behavior enables quality of life features like Hot Reloading, allowing you to see the changes you've made to your code in real time - as soon as you save the file. No need to stop and start the game.

Debug View and Editor

Debug View and Editor

Matter comes with a world-class debug view and editor. In addition to viewing all your game state in one place, the debugger integrates with an immediate-mode widget system to make creating debug conditions dead simple. Performance information, queries, logs, and recent errors are displayed for each system, enabling deep insight into what your code is really doing.

All systems run in a fixed order, every frame

RenderStepped

moveCutSceneCameraanimateModelscamera3dEffects

Heartbeat

spawnEnemiespoisonEnemiesenemiesMovefireWeaponsdoors

Robust and Durable

Event-driven code can be sensitive to ordering issues and new behaviors can be created accidentally. With ECS, your code runs contiguously in a fixed order every frame, which makes it much more predictable and resilient to new behaviors caused by refactors.

All systems have access to all the data in the game, which means adding a new feature is as simple as creating a new system that simply declares something about the world.