From SSH Weekend Project to Cheat-Proof TUI MMO: The Evolution of World of TUICraft
Just a few days ago, we introduced World of TUICraft—a fully persistent, multiplayer retro fantasy RPG running entirely over SSH and in the browser.
The game has evolved rapidly. What started as a lightweight TUI experiment has matured into a robust, balanced, and cheat-proof virtual world. We’ve decoupled servers for zero-downtime updates, engineered telegraphing boss fights, implemented strict anti-exploit combat logic, and even rolled out a Model Context Protocol (MCP) server that lets AI models play the game programmatically.
Here is a deep dive into the engineering and game design updates that have transformed World of TUICraft from v1.0 to v2.4.
Play Right Now (No Install)
Before we look under the hood, you can jump into the game in less than 10 seconds:
ssh worldoftuicraft.thoughtlesslabs.com
Prefer a browser? Play the web-wrapped terminal version at worldoftuicraft.thoughtlesslabs.com.
1. Zero-Downtime Infrastructure: Decoupling Game and Web Services
In the initial release, the SSH game loop and the web terminal server ran in a single node process. Any web update or site maintenance required restarting the server, which booted active players from their dungeon runs.
To solve this, we decoupled the services:
The Game Server handles the core game loop, SQLite database transactions (
dungeon.db), procedural generation, and SSH connections on port2222.The Web Server runs a lightweight web portal on port
3000containing the Adventurer’s Guide, live Leaderboards, and anxterm.jsterminal client that proxies SSH traffic to the game server.Why it matters: We can now build and redeploy the web frontend or adjust web routing without dropping a single active SSH player.
2. Fight or Flight: Telegraphing Boss Attacks and Leashing
Combat in the original release was a simple stat check. Now, it’s a dynamic dance. We’ve introduced themed boss mechanics and movement-based gameplay:
Unique Telegraphed Boss Attacks
Each of our 15 guardian bosses now features themed telegraphed area-of-effect (AoE) attacks (e.g., Fel Rush, Fiery Blast, Blizzard, Death Coil, Earth Shatter).
The Loop: When a boss charges an attack, it targets a player’s coordinates and signals the charge-up to the chat log and stats sidebar.
The Timing: Players have exactly 2 game ticks (~600ms) to move their characters out of the target tile on the grid.
The Impact: Failing to dodge results in massive damage (multiplying the boss’s base power by 2.5x).
[Combat] Ruinbringer the Worldbreaker strikes the ground, causing fissures... An Earth Shatter is charging!
[Combat] You move to (12, 4)
[Combat] Ruinbringer the Worldbreaker shatters the earth, dealing 48 physical damage! (You successfully dodged!)
🐕 Boss Leashing and Empty Zone Resetting
To prevent players from “cheesing” bosses by pulling them to zone entrances or hallway corners, we added leash mechanics:
If a boss or Elite monster wanders more than 8 tiles away from their original spawn point (
distFromSpawn > 8), they instantly reset, teleport back to their spawn coordinates, and heal to full.If a dungeon zone becomes entirely empty (all players leave or die), the game loop immediately cleans up the zone state, teleports all monsters back to spawn, and restores them to full health to prevent entrance camping.
3. Balancing the Economy: Anti-Exploit Mechanics
With real players leveling up and competing on the leaderboards, protecting the game’s economy and progression became a priority. We introduced several classic MMO control systems:
💀 Consequential Death
Dying in a dungeon now carries real stakes:
You lose 20% of your current gold.
You drop 1 random unequipped item from your inventory, which is permanently deleted from the database.
To prevent instant respawning at a monster’s feet, dead players must type
/stuckor reconnect to resurrect back in town with 50% HP.
📉 Grey-Mob XP & Gold Penalties
High-level characters can no longer farm low-level monsters for easy gold or XP:
If a player’s level exceeds the monster’s level by 5 or more, they suffer a 90% reduction in gold and XP rewards.
If the gap is 10 or more, rewards drop to zero.
Bosses slain repeatedly by the same character have their gold and XP rewards slashed by 75%.
🔑 Dungeon Loot Gating
To prevent players from running shallow starter dungeons to obtain top-tier gear, item drops are now gated by depth:
Epic items are restricted to dungeon depth 5+.
Legendary items are restricted to dungeon depth 9+.
If a legendary item rolls in a shallow depth, the loot generator automatically downgrades it to match the zone’s tier limits.
🧙♂️ Mage Weapon Restrictions
Mages could previously scale their magical spellpower by equipping heavy physical weapons like swords or axes. We restricted fireball calculations so they only scale with equipped Wands or Staves. Furthermore, wands and staves now multiply their power bonus by 1.5x when casting Fireball, making upgrading magical weapons highly impactful.
4. Social & QoL: Trading, Clans, and Nerd Fonts
We’ve rounded out the social features of the virtual world:
Interactive Player-to-Player Trading: Players can now exchange gold and items via a step-by-step trading overlay using
/trade @PLAYER. To prevent bots or burner accounts from transferring starter gold, trading is gated to characters Level 3 and above.Cozy Clan Sanctuaries: Teleport to your clan’s private hall via
/clan hall. Clan halls are dynamically instanced byclan_idto serve as safe meeting spots.Nerd Font Support: By typing
/nerdfont, players can toggle beautiful graphical terminal map icons and stats sidebar prefixes (like♥for HP,🪙for gold, and⚔️for weapons) instead of raw ASCII characters.Hidden Dungeon Portals: The exit door to the next depth now remains hidden in a random dungeon room and is only revealed once the guardian boss of the current depth has been defeated.
5. The Dev Playground: Programmatic Play via MCP
Perhaps the coolest upgrade for developers is the addition of a remote Model Context Protocol (MCP) server over Server-Sent Events (SSE).
Because the game client is text-based and authoritative on the server, we’ve exposed the entire game interface as a suite of MCP tools. AI agents (like Claude or custom LLM bots) can connect to the game, authenticate, inspect the 32x11 viewport map, move, attack, manage inventory, and buy upgrades.
// Example: The get_view tool returns structured state for bots
{
"map": "################################\n#....#.......#........#....D...#\n#..@.#..M....#...S....#........#\n#....#.......#........#........#\n################################",
"stats": {
"hp": 85,
"max_hp": 100,
"gold": 42,
"level": 3
},
"nearby_entities": [
{ "type": "monster", "name": "Dungeon Skeleton", "x": 8, "y": 2 }
]
}
This turns World of TUICraft into the ultimate AI playground. You can write scripts and build LLM agents to play the game, form clans, and fight bosses alongside human players in the shared world.
🛠️ The Tech Stack At a Glance
Runtime: Bun (native TypeScript executor and SQLite drivers)
Database: SQLite (
bun:sqlitewith WAL mode)Terminal Engine:
@opentui/core(ANSI diffing, absolute cursor positioning)Web Frontend: Vanilla HTML/CSS,
xterm.jsfor SSH proxyingIntegrations: MCP SSE Server for programmatic bot support
What’s Next?
We are working on adding class-specific talent trees, custom player-housing instances, and group-dungeon dungeons with complex threat management.
Grab your SSH client, set your terminal font to a patched Nerd Font, and we’ll see you in the depths of Depth 10!
Would you write a bot to play World of TUICraft, or do you prefer keyboard-turning your way to the top of the leaderboards? Let us know in the comments!





