Skip to content

Build the world. Keep the rules.

Citadel is a Rust-first game server for shared worlds, authoritative game logic, realtime play, and durable player data.

Two player heroes send actions to Citadel, which returns one synchronized shared world.

Players propose actions. Citadel applies the rules and returns one shared world.

GameScript: write your rules, keep them fair

Section titled “GameScript: write your rules, keep them fair”

Citadel’s signature move: write your game’s rules — movement, damage, loot, win conditions — in Lua, Python, or JavaScript, and the server makes them the authoritative law. Players can only propose; your script decides what actually happens. Easy to write and hot-reload, impossible to cheat.

Meet GameScript →

You do not need to understand networking theory before seeing Citadel work. The first quest is intentionally small:

1. Run Citadel

One command builds the server, starts the local game backend, and serves a browser demo.

2. Open two players

Open two browser tabs. Each tab joins as a guest and gets its own realtime participant.

3. Move the shared world

Move in one tab. The other tab receives the update and renders the peer. That is your first multiplayer loop.

Take the quickstart →

I want a tiny online game

Build Knights vs Monsters. You will write server rules, connect a client, validate attacks, and share monster state.

Start the tutorial →

I already use a game engine

Install the Unity, Unreal, or Godot SDK and connect your existing project to Citadel.

Choose an engine →

I build for the web

Use @citadel/client over WebSocket and keep rendering in your own Three.js or browser app.

Connect a web game →

I write the server rules

Write your game’s rules in GameScript — Lua, Python, or JavaScript — and let the server make them authoritative. All three follow one language-neutral host contract.

Meet GameScript →

Every Citadel game has three clear roles:

  • The game client owns input, cameras, animation, sound, and immediate visual feedback.
  • Citadel owns connections, identity, rooms, routing, persistence, and the services that players share.
  • Your game logic decides what is allowed: movement limits, damage, rewards, spawns, match rules, and any other server-owned truth.

That separation is the core idea behind the whole documentation. Learn it once, then reuse it in Unity, Unreal, Godot, Rust, or the web.

Citadel already ships device/custom authentication, authenticated realtime connections, named rooms, single-node authoritative matches and presence, storage, friends, groups, durable chat history, leaderboards, a durable notification inbox with local live delivery, wallet services, operator APIs, and client surfaces for Unity, Unreal, Godot, Rust, and the web. Lua ships by default; Python and capped JavaScript runtimes are feature-gated.

Some arcs are still in progress: cross-node authoritative match ownership, live chat fan-out and typing, hardened WASM game logic, full Node/TypeScript hosting, Rust-as-a-crate game logic, and a few platform/package ergonomics.

  • Start here gives you a working server and a playable tutorial.
  • Concepts build the mental model in plain English.
  • Guides complete one real workflow at a time.
  • Reference gives exact methods, parameters, errors, configuration, and wire layouts when you need precision.