Skip to content

Examples

Every example is a complete, self-checking program built as tess_<name> by the dependency-free examples preset (the EnTT and Flecs adapter examples additionally need their ECS gates, which the dev preset turns on):

cmake --preset examples
cmake --build --preset examples
./build/examples/examples/tess_quickstart

Start here

  • Live pathfinder — the interactive WebAssembly demo, built from the same C++20 headers as the library and published with this site.
  • Live colony — the scale demo: up to 1,024 agents shuttling between the edges and replanning around walls you draw (walls survive resets), with a trip counter, a per-tick cost readout, and a retained-routes vs replan-every-tick toggle.
  • quickstart.cc — the complete program on the home page: a world, a schema, and an A* query.
  • colony_2d.cc — the flagship composition: queued construction edits through the auto-exec schedule task, an OnDirty topology rebuild, movement-class agents routing around the new wall, and a DeltaFrame render consumer, all in one tess::Schedule loop.

Pathfinding and topology

  • mvp_path.cc — a small end-to-end queued-edit plus A* pathfinding prototype.
  • stairs_3d.cc — the StairTransitions provider connecting two z-levels, with reachability, the path-runtime precheck, and an incremental update after demolishing the stair.

Scale: many agents and large worlds

  • path_agents.cc — a multi-agent path-agent tick loop with goal assignment, dirty-driven replanning, and blocked-path handling; the focused subset of what colony_2d.cc composes into a full frame.
  • ant_farm_vertical.cc — a degenerate-axis vertical world (x-z cross-section) where many ants share one distance-field product through the byte-budgeted FieldProductCache instead of searching independently.
  • web_colony — the source of the live colony demo: the colony_2d composition compiled to WebAssembly, with a native self-checking model binary keeping it under the same CI as every other example.
  • sparse_stream.cc — budget-bounded sparse residency: a 1,024-chunk world held to a 16-page budget (64x less resident field storage), and a path query that reports Indeterminate until the missing bridge chunk is streamed in and the retry succeeds.

Integration boundaries

  • custom_ecs_min.cc — the ECS adapter concepts implemented by a deliberately non-EnTT-shaped micro ECS.
  • entt_pawns.cc — the EnTT adapter driving registry-owned pawns (built when TESS_ENABLE_ENTT is on).
  • flecs_pawns.cc — the Flecs adapter driving world-owned pawns (built when TESS_ENABLE_FLECS is on).
  • render_delta_consumer.cc — a standalone DeltaFrame consumer rebuilding a shadow grid from published frames.
  • web_pathfinder — the source of the live demo above: a single-threaded WebAssembly build with a small JavaScript shell.