---
title: "Build an AAA-class game engine with AI | MS WebX"
description: "Our game FRIENDLY? runs on its own Rust and Vulkan engine, written by AI agents under human direction. See the loop and the nine rules."
canonical: https://mswebx.com/build-a-game-engine-with-ai
language: en
robots: index, follow
og_type: website
type: build-game-engine-with-ai
language_alternates:
  en: https://mswebx.com/build-a-game-engine-with-ai.md
  cs: https://mswebx.com/cs/herni-engine-pomoci-ai.md
  de: https://mswebx.com/de/spiel-engine-mit-ki-bauen.md
  es: https://mswebx.com/es/crear-motor-de-juego-con-ia.md
  fr: https://mswebx.com/fr/creer-moteur-de-jeu-avec-ia.md
  hu: https://mswebx.com/hu/jatekmotor-epitese-mi-vel.md
  it: https://mswebx.com/it/costruire-motore-di-gioco-con-ia.md
  nl: https://mswebx.com/nl/game-engine-bouwen-met-ai.md
  pl: https://mswebx.com/pl/budowa-silnika-gier-z-ai.md
  pt: https://mswebx.com/pt/criar-motor-de-jogo-com-ia.md
  ru: https://mswebx.com/ru/игровой-движок-с-помощью-ии.md
  tr: https://mswebx.com/tr/yapay-zeka-ile-oyun-motoru-yapimi.md
  zh: https://mswebx.com/zh/用ai构建游戏引擎.md
  ja: https://mswebx.com/ja/aiでゲームエンジンを作る.md
  ar: https://mswebx.com/ar/بناء-محرك-ألعاب-بالذكاء-الاصطناعي.md
  ko: https://mswebx.com/ko/ai로-게임-엔진-만들기.md
  pt-br: https://mswebx.com/pt-br/criar-engine-de-jogos-com-ia.md
  hi: https://mswebx.com/hi/एआई-से-गेम-इंजन-बनाना.md
content_hash: sha256:7a5781f64b419930f38a4ebee12bcb207d262923cc2aa856bd0081497a198e4a
generated: 2026-11-18
---

> **Machine-readable Markdown rendering.** This is a Markdown representation of a web page,
> served for AI agents and crawlers as a token-efficient alternative to the full HTML.
> Full interactive HTML version: https://mswebx.com/build-a-game-engine-with-ai
> Canonical URL: https://mswebx.com/build-a-game-engine-with-ai
> Available languages: en, cs, de, es, fr, hu, it, nl, pl, pt, ru, tr, zh, ja, ar, ko, pt-br, hi
> Change detection: `content_hash` is the SHA-256 of this document's Markdown body — everything
> below this block, whitespace-trimmed, excluding the front-matter. Compare it to detect a real
> content change; `generated` moves on every render and is not a change signal.

Build a game engine with AI

# How to build an AAA-class game engine with AI agents

We are building FRIENDLY?, a survival game on our own engine in Rust and Vulkan, built toward AAA-class graphics and netcode. The engine is written by AI agents under human direction and held to a strict contract: nothing merges until it passes its gates. This page shows the loop and the nine rules behind it.

[![Golden-hour view over forested hills and a mountain valley, low warm sunlight and hazy ridges fading into the distance.](/images/uploads/994a7f09-862a-48f3-bfab-15e766539ee4/friendly-game-engine-golden-hour-mountain-valley-1920x1080.jpg)](/images/uploads/994a7f09-862a-48f3-bfab-15e766539ee4/friendly-game-engine-golden-hour-mountain-valley-1920x1080.avif "View image full size")

## What we are building

FRIENDLY? is a survival game in early development.

The engine is written in Rust (edition 2024) directly on Vulkan 1.3 or newer, with precompiled Slang shaders, the Bevy ECS crate, Jolt Physics 5.6 and DLSS and FSR upscaling.

Netcode is server-authoritative, on QUIC with TLS 1.3. The world is a real valley, about 6 by 6 km.

About 100 % of the code is written by AI agents under human direction. The game’s own project file puts the contract in one sentence: “Strictness is the product.”

## The loop: plan, decide, lane, gates, merge

The same loop runs our game engine and goes into your repository when we set up your agents.

1.

### Plan

    The owner owns the plan. Features go PRD → tasks → process.
2.

### Decide

    Every decision is written down as an ADR before code exists.
3.

### Lane

    One change, one lane. Specialist agents, one lead.
4.

### Gates

    Tests and a lint wall that only gets stricter. A new gate must first fail once.
5.

### Merge

    Only green work lands. Agents cannot loosen their own rules.

## Nine rules that make agents reliable

Each rule has the reason behind it and one concrete example from the engine.

1.

### The owner owns the plan

      Rule

     People decide what gets built. Agents build it.

     Why

     Agents carry out a plan well. Choosing the plan is the part you cannot hand over.

     Example

     Features go PRD → tasks → process, and the plan stays with the owner.
2.

### Decide first, in writing

      Rule

     A decision is written down before code exists.

     Why

     A written decision can be checked and reversed. A decision hidden inside a diff cannot.

     Example

     Every decision is an ADR, and a new crate needs an ADR before it exists.
3.

### One change, one lane

      Rule

     Each change gets its own lane.

     Why

     A small, separate change is easy to review and easy to throw away.

     Example

     Every change in the engine lives in its own lane and must pass the gates before it merges.
4.

### Gates before merge, and a new gate fails first

      Rule

     Nothing merges until the gates pass, and every new gate is proven red before it is trusted.

     Why

     A check that has never failed may be checking nothing.

     Example

     The lint wall is the clippy groups all, pedantic and nursery plus about 70 restriction lints. Shipping code has no panics, unsafe code lives only in allowlisted crates, every item has docs, and tests come first.
5.

### The agent cannot loosen its own rules

      Rule

     The control plane is read-only to the agents.

     Why

     A rule an agent can edit is only a suggestion.

     Example

     Rules, hooks, agents and the lint wall are locked read-only. `#[allow]` is banned; only `#[expect(lint, reason)]` is allowed, with a written reason. The wall only gets stricter.
6.

### Knowledge lives in files

      Rule

     What the agents need to know is written into the repository.

     Why

     What lives in a chat is gone in the next session. What lives in the repo is read every time.

     Example

     We keep project knowledge in repository files we call living skills.
7.

### A door agent and specialists

      Rule

     One lead agent receives the work and hands it to specialists.

     Why

     One agent keeps the whole picture. Specialists keep the depth.

     Example

     A lead “door” agent works with specialist agents for rendering, netcode and Rust review.
8.

### Hooks stop dangerous actions

      Rule

     Dangerous actions are blocked by hooks, not by instructions.

     Why

     An instruction is advice. A hook is enforcement.

     Example

     In the engine’s repository, hooks stop dangerous actions before they run.
9.

### No claim without a real run

      Rule

     A number is published only when a real run produced it.

     Why

     A number from memory is a rumour.

     Example

     We publish measured numbers only from real runs, with the hardware named. That is why this page has no frame-rate figures.

## Three examples from the engine

Each example is a feature of the engine and the rule that stands behind it.

### Weather fitted to real records

The weather model is calibrated on ERA5 reanalysis and on NCEI and DWD station records. It drives volumetric clouds and uses the real positions of the sun and the moon.

Rule 9 at work: the model is fitted to measured records, not to taste. The clouds are the part that is still unfinished; see below.

 [![Snow-covered valley seen past spruce trees in the foreground, forested ridge on the right, mountains in the distance.](/images/uploads/125a8776-155f-44aa-bf21-b99d06af4e0a/friendly-game-engine-snow-covered-valley-1920x1243.jpg)](/images/uploads/125a8776-155f-44aa-bf21-b99d06af4e0a/friendly-game-engine-snow-covered-valley-1920x1243.avif "View image full size")Snow-covered valley in the engine.

### Trees where real trees stand

The map is a real valley near Ružomberok in Slovakia, about 6 by 6 km of real terrain. Trees stand where the valley’s 1 m LiDAR data says trees stand.

The choice to build on a real valley is recorded as an ADR, like every decision (rule 2).

 [![Low sun shining through tall spruce trees on a forested slope.](/images/uploads/23260b7e-0c11-4715-9b4c-fa755a6ccb83/friendly-game-engine-low-sun-spruce-forest-1920x1080.jpg)](/images/uploads/23260b7e-0c11-4715-9b4c-fa755a6ccb83/friendly-game-engine-low-sun-spruce-forest-1920x1080.avif "View image full size")Low sun through spruce trees on a forested slope in the engine.

### Bullets without hitscan

Every round flies its own path under gravity, Mach-dependent drag and wind. There is no hitscan.

A feature like this is where “looks right” proves nothing, which is why the method asks for gates and real runs (rules 4 and 9).

## What is not done yet

- **Cloud shapes.** The weather model drives volumetric clouds, but their shapes are not where we want them yet.
- **Global illumination.** In development, switched off by default.
- **The game itself.** It is early work in progress: a small playable scene with two houses, large forests and weather, and placeholder zombies that prove hit detection and networked ballistics.
- **The AAA-class goal.** It is the goal we are building toward. We do not claim parity with any other engine, and we publish no frame-rate numbers.

## The setup behind it

Our own AI setup on Claude Code, in numbers: a system of 27 specialised agents with 73 knowledge modules and five in-house MCP servers.

Across our own products, nothing ships unless it passes PHPStan at its highest level and ESLint, Stylelint, TypeScript, Dart and Clippy at their strictest, plus 215 custom rules. Generated code gets no exemption.

Behind it stand more than 20 years of full-stack web development, more than four years of building with AI, and our own web framework in 18 languages.

## Questions people ask

Can AI agents build a game engine?

In our case the code is written about 100 % by AI agents under human direction. The result is early work in progress, and a strict contract of rules and gates is what keeps it correct.

What makes AI-written code reliable?

Gates before merge: tests, a lint wall of clippy groups plus about 70 restriction lints, and further checks. On top of that, rules and hooks that the agents cannot loosen.

Is the game finished?

No. We are building it, and it is early work in progress. What is still missing is listed under “What is not done yet”.

 Sources for the weather model: ERA5 reanalysis, NCEI station records and DWD station records (DWD data under CC BY 4.0).

## Want this discipline in your repo?

We set up AI coding agents for development teams: a rules file the agent follows, guardrails against dangerous actions, quality gates before anything merges, memory and tool connections. All of it is tested on your repository, written down and handed over to your team.

 [See how we set up AI agents](/ai-agent-setup "AI agent setup")
