Open Terrain Engine

In development — design complete, building now

The game engine your AI agent can actually build in.

An AI-native game engine. An LLM agent authors the whole game in idiomatic, human-editable C# — and you can open and edit every line.

The core loop

Author → introspect → verify

The closed loop an AI needs to build a real game — and the one editor-bound and code-blind engines can't give it.

  1. 01

    Author

    The agent writes the whole game in ordinary, idiomatic C# — entities, behavior, rules. No DSL, no scene format, no editor-owned files it can't see.

  2. 02

    Introspect

    It queries the running world as structured data — exact entity state, not pixels — so it reasons about what actually happened, frame by frame.

  3. 03

    Verify

    A deterministic, headless run (fixed timestep + seeded RNG) yields a state-dump and a screenshot. The agent asserts the game is right — and proves it.

Why C#

The authoring surface is the whole game

Most “AI-native” engines bolt an agent onto an editor or a weakly-typed script. The substrate the AI writes in is where this is won — and idiomatic C# wins it.

  • The compiler is a free verifier

    Static types + nullable refs + Roslyn analyzers catch the agent's mistakes at the exact line, before runtime. We fold the type system into the verify loop.

  • Mainstream training mass

    C# is among the most-represented languages in any model's training. The agent is simply more fluent than it is in a niche DSL or glue scripting.

  • One unified representation

    Scenes, entities, and behavior are all code — one mental model, no config/script/editor seam for the agent (or you) to drift across.

  • No editor owns the truth

    Nothing lives in inspector files a code-only agent can't see. And you inherit world-class .NET tooling to open and refactor any of it.

Game.cs
using Engine.Ecs;
using Engine.Sim;

// The agent authors gameplay as ordinary, human-editable C#.
public sealed class FallingBox : ISimGame
{
    public void Build(DeterministicWorld world)
    {
        var box = world.Spawn();
        world.Add(box, new Position(x: Fix.Zero, y: Fix.FromInt(10)));
        world.Add(box, new Velocity(dx: Fix.Zero, dy: Fix.FromInt(-1)));
    }

    public void Step(DeterministicWorld world)
    {
        foreach (var (pos, vel) in world.Query<Position, Velocity>())
            pos.Value += vel.Value; // fixed-point: bit-identical on every machine
    }
}

// Then it runs the world headlessly and asserts exact state — not pixels.
var snapshot = Sim.Simulate<FallingBox>(seed: 7, frames: 10);
Assert.Equal(Fix.Zero, snapshot.Single<Position>().Y); // landed at y = 0

Illustrative — the shape of the author → verify loop, not a frozen API.

Model-agnostic

Bring any LLM

A built-in, standard MCP server exposes the whole engine — authoring and the verification contract — to any conformant client. No vendor lock-in.

Illustrative
  1. Prompt:

    RTS sample: order the scout to move from tile (2,3) to (5,7), and prove it actually arrives — and that moving it costs no HP. I want a test I can re-run myself, not a “trust me, it compiles.”

  2. Reasoning:

    I'll author the move order in ordinary, editable C#, then verify it against the engine's deterministic-headless contract: fixed seed, fixed timestep, read the world back as structured data, and assert the exact end state. The same MCP tools work with whatever model you point at the engine.

  3. Code:
    Scout.cs
    using Engine.Sim;   // Fixed64 / Tile — fixed-point, bit-identical across OSes
    using Engine.Ecs;
    
    // A scout that walks to a target tile. Pure sim logic: no float, no System.Math —
    // the Roslyn firewall keeps Engine.Sim deterministic on every machine.
    public sealed class MoveOrder(Tile target) : IOrder
    {
        public void Tick(ref Unit unit, in SimContext ctx)
        {
            if (unit.Tile == target) { unit.OrderState = OrderState.Idle; return; }
            unit.Tile = ctx.Pathfind.StepToward(unit.Tile, target); // one tile / tick
            // Moving is free by design — HP is untouched here.
        }
    }
    
    // Issue it: scout at (2,3), heading for (5,7).
    world.Spawn(new Unit { Tile = new Tile(2, 3), Hp = 80 })
         .Give(new MoveOrder(target: new Tile(5, 7)));
  4. Tool call:
    mcp ▸simulate(seed: 42, frames: 120, inputs: "scout-move.log")200 OK
  5. Result:

    ran 120 fixed ticks @ Q32.32 · fixed-point path → bit-identical on replay

  6. Tool call:
    mcp ▸dump_world(tick: 120, select: "scout")200 OK
  7. Result:

    scout.Tile = (5, 7) · scout.Hp = 80 · scout.OrderState = Idle (arrived @ tick 23)

  8. Code:
    ScoutTests.cs
    using Xunit;
    using Engine.Mcp;   // simulate(...) / dump_world(...) — the verification contract
    
    public class ScoutTests
    {
        [Fact]
        public void Scout_arrives_and_keeps_full_hp()
        {
            // Fixed seed + fixed timestep ⇒ a replayable, assertable run.
            var snapshot = Sim.Run(seed: 42, frames: 120, inputs: "scout-move.log");
            var scout = snapshot.DumpWorld(select: "scout");
    
            Assert.Equal(new Tile(5, 7), scout.Tile);     // arrived
            Assert.Equal(80, scout.Hp);                   // moving cost no HP
            Assert.Equal(OrderState.Idle, scout.OrderState);
            Assert.True(snapshot.IsBitIdenticalOnReplay); // the determinism oracle
        }
    }
  9. Tool call:
    mcp ▸renderFrame(tick: 120) → PNG200 OK

    optional — only a multimodal client reads this channel

  10. Result:

    PASS — seed 42 · +120 ticks · scout @ (5,7) · 80 HP · reproducible from this seed

  11. Reasoning:

    Authored, run headless, and verified against the deterministic contract — not just compiled. Tool names and the contract trace to the engine design; the engine is in development, so this session is illustrative.

Verified with any conformant MCP client

  • Claude
  • ChatGPT
  • Gemini
  • Copilot
  • Cursor
  • Local models

Text introspection and state-dumps work with any model; the screenshot channel is an enhancement for multimodal ones. Graceful degradation, never a hard dependency on one vendor.

Genre-general

One core, many genres

No genre is baked into the engine — each is composed from shared primitives. The flagship proof is a small 3D RTS, chosen because it stresses the hardest subsystem: cross-platform deterministic lockstep.

Shared coreL0 · built
  • determinism firewall
  • fixed-point math
  • DeterministicWorld
  • renderer
  • asset bake
  • MCP verify
  • Third-person

    third-person cam

  • First-person

    first-person cam

  • Top-down

    top-down cam

  • Side-scroller / 2.5D

    side-scroll / 2.5D cam

  • RTSFlagship

    top-down + selection / command

  • float / snapshot
  • fixed-point / lockstep

The sim path is chosen per game — not baked into the engine.

Architecture diagram — not a game capture · pre-release target architecture.Illustrative

  • Linux + Windows
  • Vulkan
  • .NET 10 / C# 14
  • Steam

Be there at launch

Open Terrain Engine is in development. Drop your email and we'll tell you the moment it's ready — no noise, just launch.

We'll only email you about Open Terrain Engine.