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

  1. Lobby — Host creates a room (4-letter code), 1-3 others join. Host starts when ready.
  2. 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
  3. 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.
  4. Reward — each player picks 1 card from a choice of 3 to add to their deck.
  5. Repeat until boss is defeated (win) or all players are dead (lose).

2. Cards & Combat Mechanics

Resources (per player)

ResourceDescription
HPStarts at ~60. Persistent across encounters. Healing is rare.
Energy3 per turn, resets each turn. Cards cost 0-3 energy.
BlockTemporary shield, resets at start of your next turn. Absorbs damage before HP.

Shared Resource

ResourceDescription
RallyShared party pool. Certain cards add to it, anyone can spend it for burst damage or emergency block.

Card Categories

CategoryDescription
AttackDeal damage to enemies (solo).
SkillBlock, draw cards, utility (solo).
PowerPersistent effects for the rest of combat. Can be solo or party-wide.
AssistTarget an ally — heal, buff, give energy or cards.
ChainBonus 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)

CardTypeCostEffect
Strike (x4)Attack1Deal 6 damage
Defend (x3)Skill1Gain 5 Block
Bash (x1)Attack2Deal 8 damage, apply 2 Vulnerable
Rally Cry (x1)Assist1Add 4 Rally to the shared pool
Team Strike (x1)Chain1Deal 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

  1. Host creates a room, gets a 4-letter room code (e.g., "ABCD").
  2. Friends join by entering the code.
  3. 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

LayerTech
ServerNode.js + TypeScript, Colyseus
ClientPhaser 3, Colyseus JS client SDK, TypeScript
SharedCard 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

ScenePurpose
MainMenuTitle screen
LobbyCreate/join room, see connected players
MapNode map, pick path
CombatMain gameplay — hands, enemies, HP bars, energy, Rally pool
RewardCard selection after combat
GameOver / VictoryEnd 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

AssetSourceLicense
Card framesFantasy 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 elementsComplete UI Essential Pack by Crusenho — Paper/Papernote theme (itch.io)CC BY 4.0
IconsFantasy RPG Icons by drummyfish (OpenGameArt)CC0
Fallback UIKenney 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
Built with LogoFlowershow