System
In one line: a unit of logic with declared data access — you say what it reads and writes, the engine works out what can run at the same time.
A system is a class you derive from one of three bases and give two methods: Configure (declare it — Name, Phase, Input, Reads/Writes) and Execute (run it against a TickContext). The runtime gives each system its own transaction per tick, created on its worker thread and committed by the scheduler — you never call Commit.
Three shapes, picked by what the work looks like: CallbackSystem (non-entity work — input, timers, spawning), QuerySystem (do something to every entity in a view — the workhorse, parallelisable), PipelineSystem (bulk data-parallel sweeps). The declared access is what lets the scheduler parallelise safely.
How it relates
- Runtime — runs your systems every tick, in parallel.
- Scheduler & phases — turns declared access into a safe execution graph.
- View — a
QuerySystem's input set. - Transaction / PointInTimeAccessor — how a system touches data (transactional, or lock-free parallel reads).
- TickContext — the per-tick object
Executereceives (transaction, accessor, entities, side-transactions).
In the API
CallbackSystem·QuerySystem·PipelineSystem— the three bases.SystemBuilder— theConfigurebuilder (Reads/Writes/Input/Parallel/…).TickContext— whatExecutereceives (Transaction/Accessor/Entities/DeltaTime).
Learn & use
- Narrative: Guide ch.5 — systems & the tick loop
- Feature detail: declarative system scheduling · system types