Tutorials¶
22 chapters covering every feature japes exposes. Each chapter builds on the previous one; by the end you've touched every annotation and service parameter the library ships. The chapters are self-contained — you can skip around — but the basics section should be read roughly in order if you're new to ECS.
Basics¶
Components, entities, systems, queries, resources, change detection, RemovedComponents, Commands.
Advanced¶
Events, Local<T>, stages and ordering, multi-threading, @With / @Without, @Where, @Exclusive, run conditions.
Relations¶
@Relation, @Pair + PairReader, @ForEachPair + @FromTarget, cleanup policies, RemovedRelations, a worked predator/prey example.
Basics¶
| # | Chapter | What you'll learn |
|---|---|---|
| 1 | Components | Why components are records, field rules, marker components |
| 2 | Entities | spawn / despawn, Entity handles, archetype formation |
| 3 | Systems | @System methods, class registration, single-instance rule |
| 4 | Queries — @Read and @Write |
The hot loop API, Mut<C>, Entity parameters |
| 5 | Resources | Res<R>, ResMut<R>, per-world singletons |
| 6 | Change detection | @Filter(Added) / @Filter(Changed), dirty lists |
| 7 | RemovedComponents |
Reacting to deletes with per-reader watermarks |
| 8 | Commands — deferred edits |
Spawn/despawn from inside parallel systems |
Advanced¶
| # | Chapter | What you'll learn |
|---|---|---|
| 9 | Events | EventReader<E> / EventWriter<E>, double buffering |
| 10 | Local<T> |
Per-system persistent mutable state |
| 11 | Stages and ordering | Default stages, before / after, @SystemSet |
| 12 | Multi-threading | Executors.multiThreaded(), disjoint-access DAG parallelism |
| 13 | Query filters — @With / @Without |
Narrow archetype matches without binding |
| 14 | Field filters — @Where |
Per-entity value predicates (and the tier-2 fallback) |
| 15 | @Exclusive systems |
Single-threaded bulk edits, the tier-1 exclusive runner |
| 16 | Run conditions | @RunCondition / @RunIf for gating systems |
Relations¶
| # | Chapter | What you'll learn |
|---|---|---|
| 17 | Overview | What relations are, forward + reverse indices, @Relation |
| 18 | @Pair and PairReader |
Set-oriented dispatch, fromSource / withTarget |
| 19 | @ForEachPair and @FromTarget |
Tuple-oriented dispatch, tier-1 bytecode generation |
| 20 | Cleanup policies | RELEASE_TARGET vs CASCADE_SOURCE on despawn |
| 21 | RemovedRelations |
Reacting to dropped pairs |
| 22 | Predator / prey example | Everything end-to-end on a real workload |
If you're in a hurry¶
- Just want to write a physics loop? Read chapters 1–4 and you're done.
- Need change detection? Add chapters 6–7.
- Need cross-system coordination? Add chapter 8 (
Commands) and chapter 11 (stages). - Running multiple cores? Chapter 12 (multi-threading) is stand-alone.
- Building a graph of related entities (parent/child, hunter/prey, ally/enemy)? Jump straight to the relations section — chapters 17–22.