> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eucaengine.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Game engine and world engine

> Euca is both a game engine that runs worlds and a world engine that reads out their exact state — over one ECS substrate and one typed API.

Euca is **one engine** — ECS-native, written in Rust, white-box — that exposes two interfaces over the
same state:

* **As a game engine, it *runs* worlds.** Real ECS simulation, physics, and a forward PBR renderer — a
  world you build, play, watch, and act in, through one typed [HTTP API](/api-reference/introduction).
* **As a world engine, it *knows* worlds.** The same ECS state reads out exactly
  ([`observe`](/concepts/query-verbs)), its next-step odds read analytically (`peek`), it advances
  deterministically (`step`), and it branches counterfactually (`fork`). It hands you the **answer key**
  to the world it's running.

## One substrate, two interfaces

A world engine needs a world to be the truth *of*. The game-engine interface produces the world; the
world-engine interface exposes its exact state. Both operate on the same ECS data through one
deterministic core, so a richer simulation directly yields richer state to query — the two are
requirements on one artifact, not a trade-off.

The one thing you must never do is let **appearance leak into truth** — and the architecture enforces
exactly that (see [the CPU/GPU split](/concepts/cpu-core-gpu-edge)): authoritative state lives on the
CPU and is hashed into a [`state_digest`](/concepts/determinism); the GPU is a read-only consumer. Two
AI-generated visual skins of the same world produce a byte-identical digest.

## Which face matters, by use

Resolve the "is it about graphics or about ground truth?" question by **use**, not by ranking — both
faces are first-class.

| Using the engine as…                                                   | The face that matters | What it optimizes for                                        |
| ---------------------------------------------------------------------- | --------------------- | ------------------------------------------------------------ |
| **The grader** (benchmark, regret, [evaluation](/evaluation/overview)) | World engine          | Exact ground truth, `peek == step`, determinism, forkability |
| **The environment** models live in (experience, training, demos)       | Game engine           | Rendering, physics richness, performance, world breadth      |

Two render paths keep them from contaminating each other: an **observation path** (crisp, deterministic,
frame↔tick↔entity-aligned — the data/eval signal) and a **presentation path** (the full feature set —
demos, marketing, editor; never a data source). Both are kept genuinely good; only determinism-breaking
effects (TAA accumulation, motion blur) are confined to presentation.

## Two ways to drive it: the agent API and the editor

The world-engine API above is the primary surface — it is how a model or agent reads, steps, and forks the
exact state, headless and at scale. But the game-engine face is something you can also drive *by hand*: the
**`euca-studio` visual editor** (`cargo run -p euca-studio`) is one app that discovers every project, lets
you pick one, edit its scene as data, and press **Play** to run it — the experience face, the way a person
authors and watches a world. The same engine serves the same world both ways: `euca-studio --headless` runs
a project with no window and exposes exactly the agent HTTP API on `:3917`, so what you author and play in
the editor is the same world a model is graded against. The editor is a complement to the data API, never a
replacement for it — appearance stays out of [truth](/concepts/determinism) on both paths.

## Why the answer key must be white-box

Only a white-box world can report its *own* exact next-step distribution, so grading a model against the
truth is only possible from the engine side, where the world is executable, inspectable code. Euca
therefore acts as the grader: it scores every model architecture — learned, video, or latent — against
the same exact truth, with no architecture given special treatment. See [Evaluation](/evaluation/overview).

<Card title="The world-engine API" icon="eye" href="/concepts/query-verbs" horizontal>
  observe · peek · step · fork — the four verbs of the world-engine face.
</Card>
