A procedural roguelike dungeon crawler with ironman saves, cloud leaderboards, and RPG-inspired progression.
๐ฎ Play Now
The Long Hall is a browser-based roguelike where you lead a party of adventurers through an endless dungeon. Each run is procedurally generated from a seed, creating unique challenges while maintaining reproducible gameplay for speedrunning and competitive play.
- 5 Character Classes: Fighter, Wizard, Rogue, Cleric, Ranger - each with unique abilities and stat distributions
- Turn-Based Combat: D&D-inspired mechanics with attack rolls, damage dice, and armor class
- Ironman Saves: Your progress auto-saves, but death is permanent
- Cloud Leaderboards: Compete globally with authenticated score submission
- Equipment System: Items with rarities, enchantments, and mastery tracking
- Procedural Generation: Seeded RNG ensures consistent room generation across sessions
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Frontend (Vite + TS) โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Engine โ โ Content โ โ UI โ โ
โ โ - reducer โ โ - classes โ โ - render โ โ
โ โ - combat โ โ - abilitiesโ โ - leaderboard โ โ
โ โ - state โ โ - themes โ โ - input handlers โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ Clerk Auth (clerk-js) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ HTTPS
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Backend (Express + TS) โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Routes โ โ Middleware โ โ Database โ โ
โ โ - /saves โ โ - clerk โ โ - PostgreSQL โ โ
โ โ - /scores โ โ - cors โ โ - saves table โ โ
โ โ โ โ - auth โ โ - scores table โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| Layer | Technology |
|---|---|
| Frontend | Vite, TypeScript, Clerk JS |
| Backend | Express, TypeScript, PostgreSQL |
| Auth | Clerk (SSO, JWT) |
| Hosting | GitHub Pages (frontend), Railway (backend) |
| Class | Hit Die | Primary Stats | Special |
|---|---|---|---|
| Fighter | d10 | STR, ATK, DEF | High survivability |
| Ranger | d10 | RNG, AGI, FTH | Ranged specialist |
| Cleric | d8 | STR, DEF, FTH | Healing, shrine luck |
| Rogue | d8 | ATK, RNG, AGI | Escape artist |
| Wizard | d6 | MAG | Spell damage |
- Strength: Melee damage bonus
- Attack: Melee hit chance
- Defense: AC bonus
- Magic: Spell hit & damage
- Ranged: Ranged hit & damage
- Faith: Healing power, shrine luck
- Agility: Escape chance, initiative
| Type | Description |
|---|---|
| Combat | Standard enemy encounter |
| Elite | Tough enemy with better loot |
| Hazard | Trap that can be disarmed |
| Trader | Buy items with gold |
| Ally | Recruit new party members |
| Shrine | Pray for random boons |
| Intermission | Rest, hire, shop between segments |
- Node.js 20+
- PostgreSQL (for local backend development)
- Clerk account (for auth)
# Install dependencies
npm install
# Run dev server
npm run dev
# Build for production
npm run build
# Run tests
npm testcd server
# Install dependencies
npm install
# Set environment variables
cp .env.example .env
# Edit .env with your Clerk keys and PostgreSQL URL
# Build
npm run build
# Start server
npm startFrontend (via GitHub Secrets for CI):
VITE_CLERK_PUBLISHABLE_KEY- Clerk publishable keyVITE_API_URL- Backend API URL
Backend (Railway or local .env):
CLERK_SECRET_KEY- Clerk secret keyDATABASE_URL- PostgreSQL connection stringPORT- Server port (default: 3000)
The frontend automatically deploys via GitHub Actions on push to main. The workflow:
- Builds with Vite
- Injects environment variables
- Deploys to GitHub Pages
The backend is containerized and deployed to Railway:
cd server
railway upEnsure these Railway environment variables are set:
CLERK_SECRET_KEYDATABASE_URL(Railway provides this automatically with PostgreSQL addon)
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /health |
No | Health check |
| GET | /api/scores |
No | Get leaderboard |
| POST | /api/scores |
Yes | Submit score |
| GET | /api/saves |
Yes | Get user saves |
| POST | /api/saves |
Yes | Save game state |
| DELETE | /api/saves |
Yes | Delete save |
mnehmos.long-hall.game/
โโโ src/ # Frontend source
โ โโโ api/ # API client
โ โโโ content/ # Game content (classes, abilities, themes)
โ โโโ core/ # Core utilities (dice, RNG, hash)
โ โโโ engine/ # Game logic (combat, state, reducer)
โ โโโ ui/ # Rendering and UI
โ โโโ main.ts # Entry point
โโโ server/ # Backend source
โ โโโ src/
โ โโโ db/ # Database initialization
โ โโโ engine/ # Score calculation
โ โโโ routes/ # API routes
โ โโโ index.ts # Server entry
โโโ tests/ # Test suite
โโโ public/ # Static assets
โโโ .github/workflows/ # CI/CD
MIT