Co-op Roguelike Deckbuilder — Design Spec
Co-op Roguelike Deckbuilder — Design Spec
A simplified, web-based Slay the Spire-inspired deckbuilder with a co-op twist. 2-4 players fight through encounters together in real-time, using both solo and cooperative cards.
Core Concept
The gimmick: co-op card play. Players share combat encounters and play cards in real-time. The card system includes cooperative mechanics (Assist, Chain, Rally) that reward coordination without requiring it — simple to play, deep in interaction.
Target: Browser-based, playable among friends. Prototype scope.
1. Core Game Loop
- Lobby — Host creates a room (4-letter code), 1-3 others join. Host starts when ready.
- Map — Branching path of ~8 nodes. Host picks the path. Node types:
- Combat — standard enemy encounter (most common)
- Elite — harder enemies, better rewards
- Rest — heal HP
- Boss — final encounter of the run
- Combat:
- Each player starts with 3 energy and draws 5 cards from their own deck.
- Player phase — all players play cards freely in real-time. Cards resolve instantly when played. Players see each other's actions as they happen. Each player hits "end turn" when done.
- Enemy phase — once all players end their turn, enemies execute their telegraphed intents, hitting all players.
- Repeat until all enemies die or all players die.
- Reward — each player picks 1 card from a choice of 3 to add to their deck.
- Repeat until boss is defeated (win) or all players are dead (lose).
2. Cards & Combat Mechanics
Resources (per player)
| Resource | Description |
|---|---|
| HP | Starts at ~60. Persistent across encounters. Healing is rare. |
| Energy | 3 per turn, resets each turn. Cards cost 0-3 energy. |
| Block | Temporary shield, resets at start of your next turn. Absorbs damage before HP. |
Shared Resource
| Resource | Description |
|---|---|
| Rally | Shared party pool. Certain cards add to it, anyone can spend it for burst damage or emergency block. |
Card Categories
| Category | Description |
|---|---|
| Attack | Deal damage to enemies (solo). |
| Skill | Block, draw cards, utility (solo). |
| Power | Persistent effects for the rest of combat. Can be solo or party-wide. |
| Assist | Target an ally — heal, buff, give energy or cards. |
| Chain | Bonus effect when other players also play Chain cards this turn. |
Status Effects
Standard:
- Strength — +X damage on attacks
- Vulnerable — take 50% more damage
- Weak — deal 25% less damage
- Poison — lose X HP at start of turn, decreases by 1 each turn
Co-op:
- Linked — when one Linked player blocks, the other gains half that block
Starter Deck (10 cards per player)
| Card | Type | Cost | Effect |
|---|---|---|---|
| Strike (x4) | Attack | 1 | Deal 6 damage |
| Defend (x3) | Skill | 1 | Gain 5 Block |
| Bash (x1) | Attack | 2 | Deal 8 damage, apply 2 Vulnerable |
| Rally Cry (x1) | Assist | 1 | Add 4 Rally to the shared pool |
| Team Strike (x1) | Chain | 1 | Deal 5 damage. +4 for each Chain card others played this turn |
Enemies
- All enemies show intent icons before acting (attack, buff, debuff).
- Enemies attack all players by default.
- Enemy HP scales with player count (x1 for 2p, x1.5 for 3p, x2 for 4p).
- V1 scope: ~5 basic enemy types, 2 elites, 1 boss.
Extensibility
Cards are defined as data (not hardcoded logic). Adding new cards, status effects, enemies, or categories requires adding data entries — not rewriting game code. Future additions: relics/items, shops, events, character classes.
3. Multiplayer & Networking
Tech: Colyseus server (Node.js/TypeScript) + WebSocket connections.
Room Flow
- Host creates a room, gets a 4-letter room code (e.g., "ABCD").
- Friends join by entering the code.
- Host sees a lobby with connected players, hits "Start" when ready.
State Sync
- Server owns all game state (HP, decks, draw/discard piles, enemies, map, Rally pool).
- Player plays a card: client sends
{ action: "playCard", cardId, targetId? }. - Server validates (enough energy? card in hand? valid target?), resolves the effect, broadcasts updated state to all clients.
- All clients see card plays and results in real-time.
Turn Management
- Player phase is open — everyone plays cards freely and simultaneously.
- Each player sends
"endTurn"when done. - Server waits for all players to end turn, then runs enemy phase and broadcasts results.
Reconnection
- Colyseus handles reconnection natively.
- If a player disconnects mid-combat, their turn auto-ends after ~30s timeout.
4. Tech Stack & Project Structure
Stack
| Layer | Tech |
|---|---|
| Server | Node.js + TypeScript, Colyseus |
| Client | Phaser 3, Colyseus JS client SDK, TypeScript |
| Shared | Card definitions, types, constants (monorepo) |
Project Structure
/packages
/shared — card data, types, constants
/server — Colyseus server, game logic, room handlers
/client — Phaser game, scenes, UI components
Phaser Scenes
| Scene | Purpose |
|---|---|
| MainMenu | Title screen |
| Lobby | Create/join room, see connected players |
| Map | Node map, pick path |
| Combat | Main gameplay — hands, enemies, HP bars, energy, Rally pool |
| Reward | Card selection after combat |
| GameOver / Victory | End of run |
Hosting
- Server: Any Node.js host (Railway, Fly.io, or local)
- Client: Static hosting (Vercel, Netlify, or served by the same Node server)
5. Art & Assets
Target aesthetic: Hand-drawn / sketch style, with pixel art fallback.
Asset Sources
| Asset | Source | License |
|---|---|---|
| Card frames | Fantasy Card Assets by cafeDraw (itch.io) | CC0 |
| Monsters/characters | "The Free Monsters" by Justin Nichol (OpenGameArt) | CC-BY-SA 3.0 |
| Character art (alt) | "Fantasy Concepts" by drummyfish (OpenGameArt) | CC0 |
| UI elements | Complete UI Essential Pack by Crusenho — Paper/Papernote theme (itch.io) | CC BY 4.0 |
| Icons | Fantasy RPG Icons by drummyfish (OpenGameArt) | CC0 |
| Fallback UI | Kenney UI Pack + RPG Expansion (kenney.nl) | CC0 |
6. V1 Scope Summary
In scope:
- 1 shared character class
- ~30-40 cards (mix of solo + co-op)
- 10-card starter deck
- 3 energy / 5 card draw per turn
- ~5 basic enemies, 2 elites, 1 boss
- 8-node branching map (Combat, Elite, Rest, Boss)
- 2-4 player real-time co-op
- Lobby with room codes
- Card rewards after combat
- Rally shared resource
- Chain and Assist card mechanics
Out of scope (future):
- Shops, events, random encounters
- Relics / items / potions
- Multiple character classes
- Card upgrades
- Leaderboards / accounts
- Mobile support