A RuneScape-inspired roguelike multiplayer project organized as a TypeScript monorepo.
- Discord Activity First: Create a seamless multiplayer game embedded directly within Discord using the Embedded App SDK.
- Roguelike x OSRS: Combine the progression and data depth of Old School RuneScape with the "survivor" roguelike gameplay loop (e.g., Vampire Survivors).
- Multiplayer Focus: Enable cooperative gameplay where Discord users can jump in and play together instantly.
- Phaser 3 Client: High-performance 2D rendering wrapped in React for UI management.
- Shared Game Logic: strictly typed OSRS data and game mechanics shared between client and server (
@runerogue/osrs-data). - ECS Architecture: utilizing
bitecsfor efficient state management.
- Client: Active development (
packages/phaser-client). - Server: The Colyseus server (
packages/game-server) is a legacy prototype. The project is currently focusing on client-side logic and Discord integration.
- Phaser Client (
packages/phaser-client/) — Active Discord Activity client (Vite + React + Phaser 3) - OSRS Data (
packages/osrs-data/) — OSRS data models, calculators, and a minimal API - Shared (
packages/shared/) — Shared types, constants, and utilities - Game Server (legacy) (
packages/game-server/) — Older Colyseus prototype retained for reference
Additional folders:
docs/— Documentation and reportsscripts/— Development scriptsconfig/— Tooling configurationarchives/— Historical and deprecated code
- Node.js: v18+ (v20 LTS recommended)
- pnpm: v8+
- mkcert: Required for generating local SSL certificates (mandatory for Discord Activities).
- macOS:
brew install mkcert - Windows:
choco install mkcert
- macOS:
The project includes an automated setup script to install dependencies, generate certificates, and configure environment variables.
-
Clone the repository:
git clone <repo-url> cd runerogue
-
Run the setup script:
pnpm run setup
This command installs dependencies, checks for
mkcert, generates local SSL certificates, and creates.envfiles for you. -
Start development:
pnpm run dev
-
Verify:
- Open
https://localhost:3000to see the client. - Run tests to ensure everything is working:
pnpm test
- Open
-
Environment Variables: Managed via
.envfiles in each package. Thepnpm run setupscript creates these from templates. -
Discord Config: To test full integration, update
packages/phaser-client/.envwith yourVITE_DISCORD_CLIENT_IDobtained from the Discord Developer Portal. -
This runs each package's
devscript where available (e.g., Vite inpackages/phaser-clientand watch tasks elsewhere). -
The legacy server in
packages/game-servercan be run independently if needed; see its README and.envrequirements.
From the repository root:
pnpm run build— Build all packagespnpm run test— Run Jest tests where presentpnpm run lint— Lint all packagespnpm run dev— Start development servers/watcherspnpm run clean— Remove build artifacts
pnpm run testNote: This project uses Jest; some packages may not currently define tests.
The Colyseus-based legacy server lives in packages/game-server. To run it:
pnpm run server:devThis starts the server on ws://localhost:2567 (HTTP/WS by default, HTTPS/WSS if certs are present).
Integration tests connect to a running server and are opt-in to keep the default test run hermetic.
- In one terminal, start the server:
pnpm run server:dev- In another terminal, run the integration test suite:
pnpm run test:integrationAlternatively, to include integration tests in a single run, set the flag and use the root config:
RUN_INTEGRATION=1 pnpm run test- Network schemas and shared contracts live in
packages/shared. packages/game-serveris a legacy prototype and not the canonical backend. No active replacement server is included in this repository today.- The Phaser client in
packages/phaser-clientis the current, supported client.
See CONTRIBUTING.md for guidelines.
See CREDITS.md for acknowledgements and external resources.
MIT — see LICENSE.