Skip to main content
Euca has three ways to persist and rebuild worlds:
  • Scenario — one JSON document describing a complete setup (templates, entities, rules, assertions, camera, game config). POST /scenario wipes and rebuilds the world from it; GET /scenario exports the current world back out. This is the recommended way to set up a world in one call.
  • LevelPOST /level/save / POST /level/load for a level file (entities, rules, camera, game state); the loader auto-detects the format and can build a procedural MOBA map.
  • ScenePOST /scene/save / POST /scene/load for a lower-level scene file.
Fully headless. All scene/level/scenario endpoints run on the :3917 server.

Scenario round-trip

# Export the current world as a scenario
curl -s http://localhost:3917/scenario
# {"version":2}                      ← empty world

# After spawning one entity:
curl -s http://localhost:3917/scenario
# {"version":2,"entities":1, ...}
A scenario bundles templates, entities (inline or template-referenced), rules, assertions, camera, and game config — the whole dota.sh-style setup as one document. See Build a scene for a worked example.
Scene/level save is lossy. The world→spawn-request extraction restores only position, scale, health, and team. It drops velocity, rotation, physics body angular state, and gameplay state (gold, XP, ability cooldowns, AI goals). Round-tripping a world through save/load is not byte-identical — use snapshots and the state_digest for exact reproducibility, and scene/level files for authoring/layout.

Endpoints

MethodPathDescription
POST/scenarioApply a scenario (wipes + rebuilds the world)
GET/scenarioExport the current world as a scenario
POST/fork/{id}/scenarioApply a scenario to a fork
POST/level/save · /level/loadSave / load a level file
POST/scene/save · /scene/loadSave / load a scene file

Status

  • ✅ Scenario apply/export (including into forks), level save/load with format auto-detect + procedural MOBA map, scene save/load — shipped and headless.
  • 🟡 Scene/level save/load is a partial round-trip (position/scale/health/team only). For exact state, use snapshots + digest.

Scene & scenario endpoints

Scenario, level, and scene endpoints with schemas.