Skip to content

Ariadne worlds L3: spawn points, the minimap and road suggestions; the world_lab demo - #1151

Merged
transfix merged 5 commits into
masterfrom
feat/spawn-points
Nov 12, 2026
Merged

transfix merged 5 commits into
masterfrom
feat/spawn-points

Conversation

@transfix

Copy link
Copy Markdown
Owner

L3 in ARIADNE_WORLDS.md (sections 14 and 15): spawn points for the world's vehicles, set on a minimap, with a spawn policy and points suggested along the roads. It also brings the demo the owner held back until L3: world_lab.ari with every lab panel.

Spawn points in the world block

world:
  spawns:
    policy: round_robin      # fixed | random | round_robin | nearest_free
    scope: team              # the draw and the turn kept per team, per archetype, or for all
    points:
      - { at: [-60, -60], heading: 45, team: 0, world: flat }   # heading: degrees from +x
      - { at: [60, 60], heading: -135, team: 1, archetype: humvee }

world_rules::spawns (spawn_point, spawn_rules), parsed and checked: a known policy and scope, finite points, and archetypes the world offers.

The runtime: WorldSpawns (world_spawns.h), one per WorldVehicles, with nothing process-wide.

  • Points per world. Each point belongs to one of the scene's worlds, or to all of them, so the table follows the world on. It is checked against that world's grid. A point off the world, blocked, or within 6 m of another is refused; one a Regenerate blocks is shown blocked and not taken.

  • The policy. A vehicle spawned without a start of its own takes a point from the free points whose tags match it (team -1 and archetype "" match anything):

    • fixed: the first;
    • random: any, with the same draw on every platform;
    • round_robin: each in turn;
    • nearest_free: the first no vehicle is near.

    The draw and the turn are kept per scope. A point a vehicle sits on moves the new vehicle aside along the point's normal. With no point to take, a vehicle starts at a free point of the grid, as in L2.

  • Road suggestions. Candidate points are sampled from the world's road mesh (its asphalt items, which a generated world's world geometry carries, drawn or headless): one per spacing metres square, free in the grid, each heading along its road. Accept adds them with the tag keys' team and vehicle.

  • The minimap. It is a viewport with mode: map, input: pick and pick: spawns.pick. Each press that hits runs spawns.tool (add, remove or tag) at the point.

  • Keys. <prefix>.spawns.*:

    • the table: ids, count, summary, and points.<id>.{x, y, z, heading, team, archetype, world, free};
    • the suggestions;
    • policy, scope, world, status and rev;
    • the requests: suggest, accept and clear.
  • C++ API: WorldVehicles::spawns() (add, remove, tag, nearest, choose, suggest, accept, points), and road_spawn_points. SceneWorld::bind_vehicles and WorldVehicles::set_ground take the spawn rules, the world on's name and its world geometry.

Drawing (cvcGL). Each point is a pad in its team's colour (white for any team, dark when blocked) with a pointer along its heading. Each suggestion is grey. All are tagged spawns, so a view's show: or hide: picks them; they are drawn again when the points' revision moves.

The panel: spawn_points.ari (args spawns, view, listed in INDEX.ari) has:

  • the minimap;
  • the tool, heading, team and vehicle;
  • the policy and scope;
  • Suggest along roads, with the count and spacing, then Accept and Clear;
  • the points.

spawn_points_controls is the same without the window.

The demo: examples/ariadne/documents/world_lab.ari has:

  • the three worlds (generated, terrain, flat), a crate and a ball;
  • a Humvee (the installed model) and a RoboRacer with ranges;
  • a studio scene with a vehicle_preview node;
  • four team points on the flat square, round-robin per team;
  • every lab panel: World, Physics, Vehicles and Spawn points.

Docs

  • ARIADNE.md: "Spawn points".
  • ARIADNE_WORLDS.md: the L3 row (built), and where the roads come from.

Tests (Windows Release)

  • ariadne_scene_world_test, 4 new tests (AriadneWorldSpawns.*):
    • the block and its errors;
    • points per world and the minimap's add, refusals, tag, remove and clear;
    • the policy's choice (round-robin per team with a crowded point moved aside, a team- and archetype-tagged point, nearest-free, random);
    • suggestions along a generated world's streets, the same each time, then accepted.
  • cvcgl_ariadne_physics test_vehicles_drawn: a marker for a declared point and for one a pick adds.
  • AriadneComponents.SpawnPointsBindTheSpawnsKeys (the minimap's mode, input and pick key, and the requests). ShippedComponentsLoadClean and ShippedExamplesDeclareWhatTheyNeed cover the new component and the demo.
  • Checked by eye with arigl snapshot:
    • the demo on the flat world: four team points on the minimap and the Humvee in the studio;
    • a scratch copy on the generated world: 11 road points suggested and accepted, and 4 Humvees spawned onto them that drive the streets (headless, 50 to 60 m each in 20 s).
  • After a full build, with master merged in, 1,402 of 1,402 related ctest passed ([Aa]riadne|[Nn]av|pycvc_world|pycvc_ari|cvcgl_ariadne|SceneWorld|[Pp]hysics|arigl|[Ww]orld[Rr]ules|room_rules|arisrv|[Jj]ob).

Also in it: master's tests do not build. #1137 made the action-intrinsic providers app-scoped after #1113 added job_intrinsics_test with the old calls. This branch carries the same one-file fix as #1150, so its CI can build; whichever merges first, the other merges cleanly.

Not in this PR: roads for a data world (a city bundle's world geometry has no road items); goals that keep nav@1 on the roads; pycvc bindings (the keys drive it from Python).

A world document's vehicles (world: vehicles: archetypes:) spawn as Jolt
vehicles into the scene's own physics world, driven by nav@1 (a policy
each) or held still, with identity and settings within ranges. The
runtime (WorldVehicles, one per SceneWorld) publishes vehicles.* and
entities.*; cvcGL draws each on its chassis (the vehicle-humvee package's
Humvee.glb, fitted, when installed) and a vehicle_preview node draws the
selected one. vehicle_selector.ari is the panel; world_source takes a
world: arg; world_physics lists the vehicles.
The vehicle presets and override keys are no longer static tables, and the
fitted vehicle models are the realized scene's (RealizedScene::
vehicle_models) instead of a function-local cache. vehicle_view.cpp's VTK
header static goes on the allowlist, as every other cvcGL file's does.
…_lab demo

world: spawns: declares points (heading, team and archetype tags, a world)
and a policy (fixed, random, round_robin, nearest_free, per team, archetype
or all). WorldSpawns, one per WorldVehicles, keeps the points per world,
checks them against the grid, picks a spawn's start by the policy, and
suggests points along a generated world's road mesh. A minimap is a
map-mode, input: pick viewport whose picks add, remove or tag points;
cvcGL draws the points tagged spawns. spawn_points.ari is the panel, and
world_lab.ari is the demo with every lab panel.
…/spawn-points

# Conflicts:
#	docs/ARIADNE.md
#	docs/roadmap/ARIADNE_WORLDS.md
#	inc/cvc/ariadne/scene.h
#	inc/cvc/ariadne/scene_world.h
#	inc/cvc/ariadne/world_rules.h
#	inc/cvc/ariadne/world_vehicles.h
#	inc/cvc/gl/ariadne/scene_realize.h
#	inc/cvc/gl/ariadne/vehicle_view.h
#	src/cvc/CMakeLists.txt
#	src/cvc/ariadne/app_runtime.cpp
#	src/cvc/ariadne/components/INDEX.ari
#	src/cvc/ariadne/scene_world.cpp
#	src/cvc/ariadne/world_rules.cpp
#	src/cvc/ariadne/world_vehicles.cpp
#	src/cvc/tests/ariadne_loader_test.cpp
#	src/cvc/tests/ariadne_scene_world_test.cpp
#	src/cvcGL/ariadne/scene_realize.cpp
#	src/cvcGL/ariadne/vehicle_view.cpp
#	src/cvcGL/test/cvcgl_ariadne_physics.cpp
@transfix
transfix merged commit 6059ab9 into master Nov 12, 2026
33 checks passed
@transfix
transfix deleted the feat/spawn-points branch November 12, 2026 03:27
transfix added a commit that referenced this pull request Nov 12, 2026
Only job_intrinsics_test.cpp conflicted. Master's #1150 fixed the same
pre-#1137 calls this branch fixed in 600c144, but kept a ProviderGuard that
clears the app's providers on the way out; this takes master's version, so the
file matches master.

The rest merged cleanly: #1151's spawn points (world_spawns.cpp, the world
rules' spawns, the loader and scene-world tests), #1145's macOS libcurl with
WebSockets (CMake and a ci.yml configure assertion), #1148's wasmtime in the
arix and ariglx recipes, and #1149's ocean band. None of them registers an
action-intrinsic provider, and none adds writable process-wide state: their
only new statics are vehicle_view.cpp's constant colour tables.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant