TAG ("The Age of Gods") is the largest of the four Olympia play-by-mail (PBM) strategy game engines (~80K lines of C). It extends the base game with artifacts, religion, quests, hero skills, effects, mining, ranger skills, and ship crafting.
Sibling engine repositories:
This repository is a standalone extraction of the TAG engine from the original multi-engine Olympia monorepo. It builds on its own with CMake.
The code is legacy K&R-style C originally targeting 32-bit systems. The C11/64-bit
modernization effort is complete: olympia-tag builds clean under the strict C11
warning ladder (all -Werror, zero warnings) and the golden flow runs clean under
AddressSanitizer/UBSan.
Important
This is a modernization project, not a development project — no new features. The goal is to bring the existing TAG engine to clean C11 on 64-bit while preserving its exact behavior. Golden output is the contract: every change must keep the golden tests passing (byte-identical), and any behavior change must be deliberate, justified, and re-baselined in the same commit. New game features, gameplay tweaks, and scope expansion are out of bounds. See BUILD_HISTORY.md for the full modernization record.
Requires CMake (>= 4.1), Ninja, and a Clang or GCC toolchain.
# Configure + build the default (debug) preset
cmake --preset debug
cmake --build --preset debug
# Binary: build/debug/olympia-tagOther presets are defined in CMakePresets.json:
debug—-O0 -g(default)release—-O3 -DNDEBUGasan-ubsan— AddressSanitizer + UndefinedBehaviorSanitizer (-O1 -g)
Without presets:
mkdir build && cd build && cmake .. && cmake --build .mkdir build32 && cd build32
cmake -DBUILD_32BIT=ON .. # requires gcc-multilib
cmake --build .run/olympia-tag.sh extracts the test fixtures (tests/olympia/fixtures/lib.tgz)
into a scratch run/olympia/lib/ directory, loads the database in immediate mode,
then runs a full -r -S turn. tests/olympia/golden_check.sh then gates the
post-turn database against a committed sha256 manifest.
# Build first (default debug preset), then:
./run/olympia-tag.sh # extract fixtures, run a turn
./tests/olympia/golden_check.sh # YES = byte-identical match
./tests/olympia/golden_check.sh --update # re-baseline after a deliberate changeThe scripts auto-detect the repo root and look for the binary at
build/<preset>/olympia-tag (override the preset with OLYMPIA_PRESET=release ...).
The same flow also runs under the asan-ubsan preset
(OLYMPIA_PRESET=asan-ubsan ./run/olympia-tag.sh) — YES plus zero sanitizer
diagnostics.
olympia/— the TAG engine sources and headerslib/— shared support code (entity lists, tiles, roads, effects, allocation, …)tests/— golden-test fixtures and the golden gaterun/— run/test driver script and scratch run directorydoc/— the TAG reference manual (r.texi) and the modernization planCLAUDE.md— working guidance (build, test, conventions)BUILD_HISTORY.md— full phase-by-phase modernization recordAUTHORS.md— authors and credits
See AUTHORS.md. Olympia was created by Rich Skrenta; this repository is maintained and modernized by Michael Henderson.
GNU Affero General Public License v3 — see LICENSE. The original Olympia sources are public domain.