Skip to content

Mnehmos/mnehmos.long-hall.game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

58 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

The Long Hall

A procedural roguelike dungeon crawler with ironman saves, cloud leaderboards, and RPG-inspired progression.

๐ŸŽฎ Play Now


Overview

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.

Key Features

  • 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

Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     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     โ”‚ โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Tech Stack

Layer Technology
Frontend Vite, TypeScript, Clerk JS
Backend Express, TypeScript, PostgreSQL
Auth Clerk (SSO, JWT)
Hosting GitHub Pages (frontend), Railway (backend)

Game Mechanics

Classes

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

Skills

  • 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

Room Types

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

Development

Prerequisites

  • Node.js 20+
  • PostgreSQL (for local backend development)
  • Clerk account (for auth)

Frontend

# Install dependencies
npm install

# Run dev server
npm run dev

# Build for production
npm run build

# Run tests
npm test

Backend

cd 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 start

Environment Variables

Frontend (via GitHub Secrets for CI):

  • VITE_CLERK_PUBLISHABLE_KEY - Clerk publishable key
  • VITE_API_URL - Backend API URL

Backend (Railway or local .env):

  • CLERK_SECRET_KEY - Clerk secret key
  • DATABASE_URL - PostgreSQL connection string
  • PORT - Server port (default: 3000)

Deployment

Frontend โ†’ GitHub Pages

The frontend automatically deploys via GitHub Actions on push to main. The workflow:

  1. Builds with Vite
  2. Injects environment variables
  3. Deploys to GitHub Pages

Backend โ†’ Railway

The backend is containerized and deployed to Railway:

cd server
railway up

Ensure these Railway environment variables are set:

  • CLERK_SECRET_KEY
  • DATABASE_URL (Railway provides this automatically with PostgreSQL addon)

API Endpoints

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

Project Structure

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

License

MIT


Links

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •