Skip to content

Doom tutorial: overview & setup

The Python adapter tutorial ends with an Adapter that prints Invocations to a terminal. This tutorial series replaces the terminal with a real game. By the end, viewers redeem Cues that change gravity, spawn bots, speed up monsters, and talk trash in the in-game chat of a live Doom session.

You’ll build it in stages. Each stage introduces one new Pack concept:

  1. A Pack with one event (say) and one queue.
  2. Talking to the game over Zandronum’s remote console.
  3. The first handler: wiring an Invocation to the game, safely.
  4. A second queue, so instant effects never wait behind chat.
  5. A timed queue with ready_after = "done", where the bridge serializes long-running effects for you.
  6. Pack state: a persistent chaos tally, a live active-effect key, and a death counter read from the game.
  7. Pack config: broadcaster-tunable caps and branding.
  8. An overlay: Doom-themed toasts and a death counter that don’t hide the game.
  9. Default redeems to finish it off.
  10. A fake crowd: a shipped scenario for rehearsing the Pack with the Crowd Simulator.

The finished Pack lives at https://git.aiko.works/mobrule/mobrule-pack-doom. Everything in this series is runnable code from it. The repo has one commit per stage, in order. Check out a commit to browse the source exactly as that stage leaves it.

  • Everything from the Python adapter tutorial: Python 3 (stdlib only), the mobrule binary on PATH, a bridge token.
  • Zandronum, a multiplayer Doom engine with a remote console (RCON): https://zandronum.com/download. Install both the client and zandronum-server. The Pack never bundles or distributes the engine. It just talks to a server you run.
  • Freedoom, free game data, so you don’t need to own Doom: https://freedoom.github.io/. (A DOOM2.WAD you own works too.)

From stage 2 onward the pack can launch the game for you, straight from the Dashboard’s Launcher panel. The manual equivalent (and the way to follow along before that wiring exists) is to start a local server with RCON enabled and connect your client to it:

Terminal window
zandronum-server -host -iwad freedoom2.wad \
+sv_rconpassword 'pick-a-password' +sv_cheats 1
zandronum -iwad freedoom2.wad -connect 127.0.0.1:10666

Keep both running for the rest of the tutorial. Next: declare the Pack and its first event.