Skip to content
/ dungeon-crawler Public template

A modular upgrade framework for a cooperative dungeon-crawler game. Includes fully separated systems for weapons, character progression, and persistent account upgrades. Designed for extensibility, easy balancing, and clean integration with socket-based multiplayer.

License

Notifications You must be signed in to change notification settings

ClaytonWas/dungeon-crawler

Repository files navigation

๐ŸŽฎ Dungeon Crawler MMO

A Production-Ready Multiplayer Game Boilerplate

License: MIT Node.js Docker Socket.IO Three.js React

Build your own MMO with Vampire Survivors-style combat, real-time multiplayer, and instanced dungeons.

Quick Start โ€ข Documentation โ€ข Features โ€ข Contributing

Status
crawler.mp4

๐ŸŽฏ What is this?

This is a fully-featured MMO game boilerplate designed as a foundation for building multiplayer games. It includes complete implementations of core MMO systems that would typically take months to build from scratch.

Perfect for:

  • ๐ŸŽฎ Game developers wanting a multiplayer foundation
  • ๐Ÿ“š Developers learning real-time game architecture
  • ๐Ÿš€ Startups prototyping multiplayer game ideas
  • ๐Ÿ”ง Anyone interested in Socket.IO/WebSocket game patterns

โœจ Features

๐ŸŽฎ Core Gameplay

  • โš”๏ธ Vampire Survivors Combat - Auto-targeting, radius-based attacks, piercing, upgrades
  • ๐ŸŒ Persistent Hub World - Social hub where all players gather
  • ๐Ÿฐ Instanced Dungeons - Party-based dungeon runs
  • ๐Ÿ‘ฅ Party System - Create/join parties, party-only chat
  • ๐Ÿ’ฌ Tabbed Chat System - Global and party chat
  • ๐ŸŽญ Multiple Characters - Up to 5 characters per account

๐Ÿ“ˆ Progression Systems

  • ๐Ÿ“Š Character Leveling - Persistent XP, levels, kills, deaths
  • โšก In-Match Upgrades - Temporary buffs that reset after dungeon
  • ๐Ÿ”“ Account Upgrades - Permanent unlocks and stat boosts
  • ๐Ÿ—ก๏ธ Weapon System - Multiple weapon types with upgrade paths
  • ๐Ÿ’Ž Loot Drops - Enemy drops (foundation ready for item system)

๐Ÿ”’ Security & Auth

  • ๐Ÿ” Session Management - Database-backed with view/terminate
  • ๐Ÿšซ Concurrent Login Prevention - Blocks duplicate sessions
  • โšก Force Login - Option to kick existing session
  • ๐Ÿ”‘ Secure Password Change - With current password verification
  • ๐ŸŽซ Play Ticket Auth - Short-lived tokens for game server

โš™๏ธ Technical Features

  • ๐Ÿ”„ Real-time State Sync - MMO-style concurrent updates
  • ๐ŸŽจ Modern UI - React + Tailwind CSS dark theme
  • ๐ŸŽฎ 3D Graphics - Three.js with camera controls
  • ๐Ÿณ Docker Deployment - Multi-service containerized
  • ๐ŸŒ LAN Support - Auto-detects hostname for local play

๐Ÿ› ๏ธ Tech Stack

Layer Technologies
Frontend React 18, Three.js, Tailwind CSS, Vite, Zustand
Backend Node.js, Express, Socket.IO
Database SQLite (easily swappable to PostgreSQL/MongoDB)
DevOps Docker, Docker Compose, Jest, Playwright
Architecture MMO-style state sync with server authority

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                              DUNGEON CRAWLER MMO                           โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚   Profile   โ”‚   Profile   โ”‚    Game     โ”‚          Game Client             โ”‚
โ”‚   Client    โ”‚    API      โ”‚   Server    โ”‚       (React/Three.js)           โ”‚
โ”‚   (React)   โ”‚  (Express)  โ”‚ (Socket.IO) โ”‚                                  โ”‚
โ”‚  Port 3000  โ”‚  Port 3001  โ”‚  Port 3030  โ”‚          Port 5173               โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ โ€ข Login UI  โ”‚ โ€ข Auth API  โ”‚ โ€ข Gameplay  โ”‚ โ€ข 3D Rendering                   โ”‚
โ”‚ โ€ข Register  โ”‚ โ€ข Sessions  โ”‚ โ€ข Combat    โ”‚ โ€ข Real-time Game UI              โ”‚
โ”‚ โ€ข Dashboard โ”‚ โ€ข SQLite DB โ”‚ โ€ข Parties   โ”‚ โ€ข WebSocket Client               โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“– View Full Architecture Documentation โ†’ (850+ lines of detailed system design)

๐Ÿš€ Quick Start

Prerequisites

Option 1: Docker (Recommended)

# Clone the repository
git clone https://github.com/ClaytonWas/dungeon-crawler.git
cd dungeon-crawler

# Start all services
docker-compose up

# Access the application
# Profile UI:  http://localhost:3000
# Game Client: http://localhost:5173

Option 2: Local Development

# Terminal 1 - Profile Server (Auth API)
cd client
npm install && npm start

# Terminal 2 - Game Server (Socket.IO)
cd server
npm install && npm start

# Terminal 3 - Game Client (Vite + React)
cd client/game-client
npm install && npm run dev

๐Ÿ“– Documentation

This project includes 4,700+ lines of comprehensive documentation:

Guide Description
๐Ÿ“ ARCHITECTURE.md Complete system design, data flow, and component interactions
๐Ÿค CONTRIBUTING.md Development workflow, code standards, and PR guidelines
๐ŸŒ WORLD_CREATION_GUIDE.md Create custom game worlds with JSON schemas
โš”๏ธ WEAPON_GUIDE.md Design and implement new weapon systems
๐Ÿ‘ค CHARACTER_GUIDE.md Character creation, stats, and progression
๐ŸŽฌ SCENE_QUICK_START.md Quick reference for scene configuration
๐Ÿงช TESTING_GUIDE.md Testing strategies, Jest, and Playwright setup

๐ŸŽฏ Quick Examples

๐ŸŒ Create a New World
# Create a new scene file
cd server/scenes
touch my_dungeon.json

Scene files support hot-reload โ€” no rebuild needed!

โš”๏ธ Add a New Weapon
// server/systems/weaponDefinitions.js
myWeapon: {
  type: 'myWeapon',
  name: 'Fire Sword',
  baseStats: {
    attackRadius: 5.0,
    attackCooldown: 1000,
    baseDamage: 20,
    damageVariation: 5,
    maxTargets: 2
  },
  upgradePath: { /* ... */ }
}

๐Ÿ“– See WEAPON_GUIDE.md for complete weapon creation docs.

๐ŸŽจ Customize the UI Theme

Edit client/game-client/tailwind.config.js to customize colors, fonts, and spacing.

๐Ÿ“ Project Structure

dungeon-crawler/
โ”œโ”€โ”€ ๐Ÿ“ client/
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ profile-client/       # Login/Register UI (React + Vite)
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ game-client/          # Game UI + Three.js rendering
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ apiServer.js          # Auth API (Express)
โ”‚   โ””โ”€โ”€ ๐Ÿ“ db/                   # SQLite database & schemas
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ server/
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ gameServer.js         # Main game logic (Socket.IO)
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ systems/              # Combat, weapons, characters, upgrades
โ”‚   โ””โ”€โ”€ ๐Ÿ“ scenes/               # World definitions (JSON)
โ”‚
โ”œโ”€โ”€ ๐Ÿ“„ docker-compose.yaml       # 4-service orchestration
โ””โ”€โ”€ ๐Ÿ“š Documentation             # 4,700+ lines of guides

๐Ÿงช Testing

# Run all tests
npm test

# Backend tests only
npm run test:backend

# Frontend tests
npm run test:frontend

# E2E tests with Playwright
npm run test:e2e

# Coverage report
npm run test:coverage

๐Ÿค Contributing

Contributions are welcome! This is a template repository โ€” fork it to build your own game, or contribute improvements to the boilerplate.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“– See CONTRIBUTING.md for detailed guidelines.

๐Ÿ“‹ Production Checklist

View production readiness checklist

Before deploying to production:

  • Replace SQLite with PostgreSQL/MongoDB
  • Add input validation (Zod schemas)
  • Implement rate limiting
  • Add comprehensive error handling
  • Set up logging (Winston/Pino)
  • Configure CORS properly
  • Use environment variables for secrets
  • Set up Redis for shared state
  • Implement anti-cheat measures
  • Add monitoring and alerting

๐Ÿ“– See TESTING_GUIDE.md for testing strategies.

๐Ÿ“„ License

This project is licensed under the MIT License โ€” see the LICENSE file for details.

You are free to use this boilerplate for personal and commercial projects.

About

A modular upgrade framework for a cooperative dungeon-crawler game. Includes fully separated systems for weapons, character progression, and persistent account upgrades. Designed for extensibility, easy balancing, and clean integration with socket-based multiplayer.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages