← All Projects

The South Ridge

A persistent text door game in the BBS tradition, played in your terminal over SSH.

Free Pascal SSH PowerShell
The South Ridge screenshot

In the 1980s and '90s, before the web, people dialed into bulletin board systems with a modem. The games those boards ran, called door games, were text-only, played in turns, a few minutes a day. Because everyone shared one world on one machine, you were never alone in it: you read about each other in the news, climbed past each other on the rankings, and sometimes jumped each other in the dark.

The South Ridge is a new door game in that tradition. There is no modem and nothing to install: you connect over SSH from any terminal, choose a Fighter, Mage, or Rogue, and get a handful of forest fights each day that return at midnight. It is still in development, so the realm is wiped now and then after big updates, and a public change log records every addition.

The game is a compiled Free Pascal program in Turbo Pascal compatibility mode, the dialect many classic door games were written in, with a color terminal interface drawn through the Crt unit. Every connection runs its own copy of the program, so there is no game server to keep alive, only a process per player. The town is split into one unit per location (the shops, tavern, chapel, cemetery, back alleys, streets, and so on) around a shared core unit for the player record, saving, login, and rankings.

Persistence is a flat file instead of a database. Every warrior lives in one fixed-size binary record file that all running sessions read and write, alongside small text files for the news, rumor board, and Champion, and a property file and ledger for the town's businesses. Days turn over at midnight real time, which restores fights, pays capped bank interest, and drives the rest of the daily rhythm.

Around the game is a small static site that explains it. Its change log is generated by a script from the game's own git history: a commit opts into the public log with a "Log:" line, so the player-facing wording is written at the moment of the change and the page rebuilds from it.

The hard part is that many players share one file with no server to referee. Each session owns one slot, and every record carries a save counter. Before a session writes, it checks that the counter on disk is the one it last saw. If it isn't, the same warrior has logged in somewhere else, and the stale session ends instead of overwriting the newer progress. Writes retry briefly when the file is busy, and a warrior counts as awake for a few minutes after their last save, so nobody can be attacked while they are playing.

Street ambushes between players add a second problem: writing to someone else's record. An attack only lands if that record is exactly as the attacker last saw it and its owner is still asleep, so a warrior who logs in halfway through an ambush never has a live session clobbered.

Player-owned businesses needed careful accounting. A deed's income and sell-back value are tied to the shop's fixed base price, not to what the owner paid, so two warriors trading a deed back and forth can only pass gold between themselves and never create it. That closed a price exploit found shortly after the businesses shipped. Balances also have a hard ceiling so integer math can never wrap, and bank interest is capped per level.

A fixed-strength final boss can only ever be beaten by the top few players, so the Ashen Wyrm is tuned to whoever wakes it. The game runs thousands of simulated fights using the real combat rules, with the challenger's own gear, calling, skills, and healing, and binary-searches for the fiercest Wyrm that still leaves a sensible player a target chance of winning. Every candidate is judged against the same dice rolls, so the search compares like with like instead of chasing noise, and the random generator is restored afterward so the real fight stays unpredictable.

Because SSH hands the game raw input from any terminal, input hygiene matters. Names, PINs, and the rumor wall accept only printable ASCII, so nobody can inject terminal escape codes into other players' screens. PINs are stored hashed, wrong guesses are slowed and capped at three, and idle sessions are disconnected after five minutes with progress saved. The daily reset triggers on any change of date rather than a later date, so a server clock moved backwards can't freeze it.

How to Play