18xx.games — Developer Documentation

This documentation is for developers implementing new 18xx game titles on the 18xx.games platform. The primary path is a linear tutorial from "understanding the engine" through to "testing your finished game."


Building a New Game

PageWhat it answers
Understanding the EngineWhat are the core objects, why action replay, how does a move travel?
Development SetupHow do I build and run the project locally and run the tests?
Game StructureHow do I add a new game title from scratch — files, constants, round configuration?
Map ConfigurationHow do I define the hex grid, terrain costs, location names, and tile supply?
Corporations & CompaniesWhat are all valid fields for CORPORATIONS and COMPANIES?
Trains, Phases & MarketHow do TRAINS, PHASES, and MARKET control the economic arc?
Rounds & StepsHow does the engine process moves, and how do I write a custom Step?
AbilitiesWhat ability types exist and when is each when: value active?
Tile ReferenceWhat is the tile string DSL, and how do I inspect tiles while developing?
Testing Your GameHow do I create a fixture, run it, and debug a failing replay?
Coding GuidelinesWhat patterns are required or forbidden in PRs?

Reference

PageWhat it answers
Game Engine ReferenceFull Game::Base, Round, Step, and Action class reference with layer taxonomy
Architecture Decision RecordsWhy Opal instead of JS, why action replay, why game pinning?

Platform & Testing Setup

PageWhat it answers
Architecture OverviewWhat components exist, how do they communicate, what is the tech stack?
Configuration & OperationsEnvironment variables, Docker services, background jobs
System BoundariesExternal service dependencies and failure behaviours

Version: 2026-05-08 — restructured around "Building a New Game" tutorial track.