Development workflows
The sources are split across two different domains:
- The
src/directory contains the C sources for the game server. - The
game/lua/directory contains the Lua sources for most of the in-game commands and logic. You should be able to focus most of your efforts here.
Devcontainer image updates
Normal CI and development use the public devcontainer image pinned by immutable
digest in .devcontainer/devcontainer.json. The image is deliberately not
refreshed on a schedule.
To update its tools:
- Change
.devcontainer/Dockerfileor.devcontainer/install-tools.shand merge the reviewed change. - Run the Publish devcontainer image workflow if the push did not trigger it.
- Copy the published image digest from the workflow summary.
- Update the
imageproperty in.devcontainer/devcontainer.jsonto that exact digest in a separate pull request. - Let the full CI suite validate the candidate before merging the new pin.
A failed image publication does not replace the currently pinned environment and does not affect ordinary CI builds.
C/Game server development workflow
To make changes to the game server sources, a typical development loop looks like this:
- Make your changes
- Run
just fmt-cto format the sources - Run
just check-and-runto run the full suite of checks and launch the server if successful - To short-circuit the checks and just build and launch, run
just build-and-run - You’ll need to CTRL+C the server and start over on the first step to make additional game server changes. Hot reloading the game server is not supported
BTech persistence migrations
BTech SQLite schema migrations are checked in under game/data/migrations/.
Stop stompymux, back up game/data/stompymux.db, and apply the required SQL
script with sqlite3 before starting a build with a newer schema. Migrations
are deliberately not applied by the running server.
C complexity ratchet
Clang-tidy enforces a cognitive-complexity ceiling of 200 for every C
function. Suppressing this check in src/ is not permitted; split complicated
control flow into named helpers instead. Run just complexity-report to see
all measured functions ordered from highest to lowest score.
The planned follow-up ratchets are 150 and then 100. Each threshold change is landed only after every existing function satisfies it, so the main branch has one global ceiling and no complexity allowlist.
Lua development workflow
The Lua sources in game/lua are where most of the player-visible logic lives. These are typically developed like this:
- Launch the server via
just build-and-run - Make changes to Lua source(s)
- Run
just fmt-luato format the sources - Using a Wizard character in-game, type
@lua/reload - If errors are encountered when reloading or starting the game, you’ll see those emitted to the server logs and to the Wizard doing the reload
More information about Lua scripting may be found in the Scripting section of the documentation.
Documentation development workflow
We use the Hugo static site generator for our documentation. See installation instructions here if you’d like to be able to build docs locally, then:
- Make your docs changes under
docs/content - Run the local devserver with
just docsite-serve - Point your browser at http://localhost:1313/ to see the changes