Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust & Roots

A post-apocalyptic game universe — designed, built, and shipped to production with Claude Code.

🌐 Live: rustandroots.ioHeroes (the game) · Chronicles (interactive fiction)

Rust & Roots is a solo-built game universe: a shared post-apocalyptic world across three products that run on one backend. This repository is a curated snapshot of the engineering core — the game server, combat engine, and Godot game client for the flagship title, Heroes of Rust & Roots — plus the design docs for the wider world. The web frontends and binary assets are deployed live at the links above.

Everything here — architecture, backend, game logic, client, and the deploy pipeline — was developed using Claude Code as the primary tool.


Heroes of Rust & Roots

A real-time, online multiplayer auto-battler: build a board during a shop phase, then watch fully-resolved combat play out against other players.

Server-authoritative by design. The server is the single source of truth for combat — clients submit their board with fully-buffed stats, the server resolves the fight in game-engine-v2.js, and the client plays back the resulting replay. There is never a discrepancy between what a player sees and what the server decides.

Backend — api/ (Node.js · Express · SQLite)

  • server.js — Express + SQLite (WAL), 60+ REST endpoints, Discord OAuth and username/password auth (scrypt hashing, HMAC-signed JWTs), the account system, and self-hosted analytics + security monitoring.
  • game-engine-v2.js — the authoritative combat engine: centralized damage resolution, keyword interactions, and status effects.
  • effect-interpreter.js — a data-driven effect system. Card behavior is authored as trigger / condition / action / target data in card_database.json and interpreted at runtime, so new cards and mechanics are added as data rather than code.
  • multiplayer.js — WebSocket match rooms (1v1 duel + 8-player rumble), MMR-based matchmaking with Elo, in-game chat and direct messages, and 20 AI opponent personalities.
  • log-analyzer.js / xai-image-client.js — optional AI integrations (@anthropic-ai/sdk for combat-log analysis; xAI for card-art generation), both gated behind env flags.

Game client — scripts/, scenes/, shaders/ (Godot 4.6 · GDScript)

  • A full Godot 4.6 client organized around 8 autoload singletons; the client is a pure display layer that submits board state and renders server replays.
  • Cross-platform export to web, Windows, and Android (per-platform renderers: forward_plus / mobile / gl_compatibility).
  • A custom visual layer: GDShaders for status effects and scene transitions, procedural particle textures, an arc-layout hand, and a separate mobile overlay layout.

Game data — data/

  • 165 units across 10 factions, plus spells, keywords, and status effects — all data-driven and live-editable through an admin card editor.

Tech stack

  • Backend: Node.js, Express, SQLite (WAL), WebSocket, JWT, Discord OAuth, @anthropic-ai/sdk
  • Client: Godot 4.6, GDScript, GDShader
  • Ops: Linux VPS + nginx + systemd, deployed via a single idempotent bash script (deploy.sh) with version-parity safety checks, a --dry-run mode, and post-deploy health checks.

Repository layout

Path Contents
api/ Game server, combat engine, effect interpreter, multiplayer
scripts/ Godot game client (GDScript)
scenes/ Godot scene files
shaders/ GDShaders — status effects, transitions
data/ Card / faction / keyword / status definitions
docs/ Design documentation — engine, combat, economy, factions, effect system
deploy.sh Production deploy script (sanitized)

About this snapshot

This is a curated public snapshot for portfolio review, committed with fresh history. Intentionally excluded: binary assets (card art, audio, fonts), the narrative manuscript, the web frontend, and all operational/secret material. The included deploy.sh is sanitized — host and credentials are redacted. The complete project runs in production at rustandroots.io.

About

A post-apocalyptic multiplayer game universe built with Claude Code. Live at rustandroots.io

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages