Cryme City — Game Design Document

1. Vision & Identity

Genre: Persistent Sandbox Crime MMORPG (Browsergame) Setting: Dystopian Cyberpunk — eine dunkle Megacity voller Neon, Implantate, Hacker und Straßengangs Platform: Mobile-First PWA (Progressive Web App), Desktop-Browser als Zweitplattform Tone: Gritty, immersive, text-driven mit stylishem Cyberpunk-UI Inspiration: Torn City (Persistenz, Sandbox, Spielerökonomie) + RuneScape (Skill-Progression, Grind-Loops) + The Fifth Family (Mobile-UX, Gameplay-Gates) Language: English (i18n-ready architecture from Day 1 via JSON translation files)

Unique Selling Points

  1. Cyberpunk statt generisches Crime — Cyberware, Hacking, dystopische Megacity statt Mafia-Klischees
  2. RuneScape-artiges Skill-System — viele parallele, grindbare Progressionspfade statt nur Gym + Crimes
  3. Fair by Design — Soft-Caps mit Diminishing Returns, Equipment als Equalizer, strikt kein Pay-to-Win
  4. Moderne UX — Clean Dark UI, Mobile-First, PWA mit Push-Notifications statt angestaubte HTML-Tabellen

2. Tech Stack

Component Technology Rationale
Frontend Next.js 15 (App Router) SSR, API Routes, i18n-Support, PWA-fähig
Styling Tailwind CSS Mobile-First, schnelles Prototyping, Dark-Mode
Backend/DB Supabase (PostgreSQL) Auth, Realtime, RLS, Edge Functions, Free Tier
ORM Drizzle ORM Typsichere DB-Queries, bessere Testbarkeit, kein Supabase-Lock-in
Deployment Vercel (Frontend) + Supabase Cloud (Backend) Zero-DevOps, Git-Push-Deployment, 0€ Start
PWA manifest.json + Service Worker Homescreen-Icon, Offline-Fallback, Push-Notifications (Phase 2)

Key Architectural Decisions


3. Core Gameplay Loop

[ Time-based Regeneration ]
        │
        ▼
┌──────────────────┐
│  Energy & Nerve  │
└──────────────────┘
        │
  ┌─────┴──────┐
  ▼            ▼
┌──────┐  ┌────────┐
│ Gym  │  │ Crimes │──→ Crime Rank XP
└──────┘  └────────┘
  │            │
  ▼            ▼
┌──────┐  ┌────────┐
│Stats │  │ Creds  │
│ +XP  │  │ +Loot  │
└──────┘  └────────┘
  │            │
  └─────┬──────┘
        ▼
┌──────────────────┐
│  PvP (Arena)     │──→ Walk Away (XP)
│                  │──→ Loot (steal Creds)
│                  │──→ Flatline (hospitalize)
└──────────────────┘
        │
        ▼
┌──────────────────┐
│  Fence / Shop    │ (sell loot, buy gear)
└──────────────────┘

Principle: Regenerate → Invest → Optimize → Dominate

Session Design: Optimaler Loop dauert 2-5 Minuten. Einloggen, Energie im Gym verbrauchen, Nerven für Crimes ausgeben, Schicht-Ergebnis einsammeln + neue starten, optional PvP, ausloggen. Timer-basierte Regen bremst natürlich und erzeugt Idle-Antizipation.


4. Character System

4.1 Level

4.2 Combat Attributes

Vier Primärattribute, trainierbar im Gym (kostet Energy + Creds):

Attribute Combat Role
STR (Strength) Raw damage output
DEF (Defense) Damage reduction
AGI (Agility) Dodge chance, initiative (who strikes first)
DEX (Dexterity) Critical hit chance, crit damage multiplier

Soft-Cap mit Diminishing Returns:

4.3 Skills (RuneScape-Style)

Eigenständige Progressionspfade mit passiven Boni. Erweiterbar designt (neue Skills = DB-Row + Config).

MVP Skills:

Skill Leveled by Passive Bonus
Hacking Corpo IT Job, Hacking Crimes Better Hacking crime outcomes, unlock digital tools
Medicine Clinic Job Faster HP regeneration, shorter hospitalization time (~15% reduction at high level)
Streetsmarts Passiv durch alle Crimes Lower crime risk, better Fence prices

Phase 2+ Skill Candidates: Mechanics (Cyberware maintenance), Chemistry (craft Stims/drugs), Engineering, Negotiation

4.4 Starter Archetypes

Gewählt bei Charakter-Erstellung. Kleiner Startbonus, nach ~2 Tagen Spielzeit ausgeglichen:

Archetype Starting Bonus
Brawler +50 STR, +50 DEF
Runner +50 AGI, +50 DEX
Hacker +5 Hacking Skill, +1 Cyberdeck (starter item)

5. Crimes

Jedes Verbrechen hat einen eigenen Crime Rank der durch erfolgreiche Ausführung steigt. Höherer Rang = weniger Risiko, mehr Ertrag, seltener Loot, neue Flavor-Texte.

MVP Crimes

Crime Unlock Nerve Cost Requirements Rewards
Street Hustle Level 1 Low None Small Creds, Common loot chance
Break-In Level 5 Medium Lockpick Kit (item) Medium Creds, Uncommon loot chance
Hacking Level 10 High Cyberdeck (item), Hacking Skill High Creds, Rare loot chance, Hacking XP

Crime Rank Progression Example (Street Hustle):

Failure Consequences: Chance of getting caught → Arrest → Hospitalization (shorter than PvP hospitalization). Higher Crime Rank reduces failure chance.


6. Jobs

Legale Arbeit als passiver Skill-Trainer mit optionalem aktiven Grind.

Mechanics

MVP Jobs

Job Skill Leveled Flavor
Corpo IT Support Hacking Debug corporate networks, maintain firewalls, learn system exploits
Back-Alley Clinic Medicine Patch up wounded mercs, learn anatomy, handle implant surgery

Streetsmarts levelt passiv durch alle Crime-Aktivitäten (kein dedizierter Job nötig).


7. Combat (PvP)

System

Round Resolution

  1. Initiative: Higher AGI strikes first (fixed for the whole fight, both sides act every round in that order)
  2. Hit Check: Acting side's AGI vs. target's DEX → determines hit/dodge
  3. Damage Calc: Acting side's STR vs. target's DEF → determines damage
  4. Crit Check: Acting side's DEX → chance for critical hit (bonus damage)
  5. HP Check: If either player reaches 0 HP → KO, fight ends

Post-Combat Options (Attacker wins)

Option Reward Effect on Loser
Walk Away Maximum XP Opponent stunned briefly
Loot Steal 5% of opponent's unsecured cash Less XP, opponent loses cash
Flatline Minimal XP Opponent hospitalized for 15 minutes

Target Selection

Newbie Protection

Hospitalization (Segmented Downtime)

Duration: Max 15 minutes (reducible via Medicine Skill)

Blocked Allowed
Gym Training Chat (Global + Whisper)
PvP (Attack & Defense) Market / Fence
Crimes Inventory Management
Travel (Phase 2) Gambling (Phase 2)
Job (continues running)

8. Economy

Currency

Money Flow

SOURCES                          SINKS
───────                          ─────
Crime Rewards ──────────→ Creds ──────────→ NPC Shop (gear, tools)
Job Salary ─────────────→ Creds ──────────→ Gym Fees
PvP Loot (steal) ──────→ Creds ──────────→ Hospital Bills
Fence (sell items) ────→ Creds ──────────→ Bank Withdrawal Fee (1%)

Bank System

Item Economy

Sources:

Sinks:

No player-to-player marketplace in MVP. (Phase 2: Schwarzmarkt)


9. Items & Equipment

Categories

Category Slots Example Items
Weapons 1 slot Knife, Pistol, Stun Baton, Mono-Wire
Cyberware 2 slots Reflex Booster (+AGI), Dermal Plating (+DEF), Optic Enhancer (+DEX), Muscle Graft (+STR)
Crime Tools Inventory Lockpick Kit (Break-In), Cyberdeck (Hacking)
Consumables Inventory Stim-Pack (heal HP), Adrenaline Shot (temp stat boost)

Rarity Tiers

Tier Drop Rate Stat Bonus Range
Common ~60% Low
Uncommon ~30% Medium
Rare ~10% High

No Durability in MVP

Items are permanent once obtained. Item degradation is a Phase 2 candidate for long-term economic balance.


10. Social Features

MVP

Phase 2


11. Leaderboards

MVP Leaderboards

Board Metric Motivation
Level Character Level + XP Universal progress indicator
Power Sum of all combat attributes Fighter prestige
Wealth Total net worth (Bank + Cash + Inventory value) Hustler prestige

Rules

Phase 2 Leaderboard Candidates


12. Visual Design

Style

Clean Dark UI with Cyberpunk Accents. Think modern trading app meets hacker terminal.

Mobile-First

Dark Mode Only (MVP)

Passt zum Cyberpunk-Thema, spart OLED-Akku, halbiert CSS-Aufwand.

Future Visual Upgrades (Phase 2+)


13. Onboarding

Narrative Intro

You open your eyes. Neon light flickers through a cracked window. There's a fresh scar on your neck — where an implant used to be. Someone stripped you clean and left you bleeding in a back-alley clinic.

The surgeon says you owe her. Everyone owes someone in this city.

Time to start climbing.

Guided First Actions

  1. "Hit the Gym — build yourself back up" → Tutorial: Gym Training
  2. "You need cash. The streets always pay." → Tutorial: First Crime (Street Hustle)
  3. "Get yourself a weapon." → Tutorial: NPC Shop purchase
  4. "See that guy? He's been eyeing your cash." → Tutorial: First PvP fight (against weak NPC or opt-in player)
  5. "Welcome to Cryme City. Nobody's going to save you." → Free play begins

Archetype Selection

Shown before the narrative intro. Simple 3-card choice:


14. Security & Anti-Cheat

MVP Security Layer

Measure Implementation
Zero Client Trust All game actions validated server-side. Client never modifies game state directly.
Supabase RLS Row Level Security policies on all player data tables. Players can only read/write their own data.
Rate Limiting Max 1 action per type per 10 seconds (configurable). Prevents bot automation.
Input Validation All API inputs validated (correct types, ranges, state checks: has energy? is hospitalized? owns item?)
Transaction Logging All Cred movements logged (from, to, amount, reason, timestamp). Enables manual audit.
Server-side Combat Combat engine runs exclusively on server. Client receives only the result log.

Phase 2 Security


15. Monetization (Phase 3+)

Model: Hybrid (Rewarded Ads + Subscription)

Strictly No Pay-to-Win. No purchasable gameplay advantage that isn't achievable through gameplay.

Tier Price Benefits
Free (F2P) 0€ Full game access, earn Cryme Coins via Fence
Rewarded Ads Watch 30s clip Small temporary bonus (+10% energy regen for 1h, small Cred bonus on next crime)
Subscription ~4.99€/month Ad-free, same bonuses as Ads but permanent while subscribed, exclusive cosmetics, profile badge

Cosmetic Microtransactions (Optional Layer)


16. Phase Planning

MVP (Phase 1) — Core Loop

Goal: Closed, addictive gameplay loop playable by real users.

Priority Feature Est. Effort
P0 Auth (Supabase), Character Creation + Archetype 2 days
P0 Energy/Nerve System (lazy regen) 1 day
P0 Gym Training (4 attributes + Creds cost) 1 day
P0 3 Crime Types with Crime Rank progression 3 days
P0 PvP Combat (5-round, server-side) + Walk Away/Loot/Flatline 3 days
P0 Bank System (deposit/withdraw/fee) 0.5 days
P0 NPC Shop (buy weapons, tools) 1 day
P0 Fence (sell items to NPC) 0.5 days
P0 Item System (Weapons, Cyberware, Tools, Consumables) 2 days
P0 Hospitalization (segmented downtime) 1 day
P1 Jobs (2h shifts, overtime, skill XP) 2 days
P1 Skill System (Hacking, Medicine, Streetsmarts) 2 days
P1 Leaderboards (Level, Power, Wealth) 1 day
P1 Global Chat + Whisper 1.5 days
P1 Narrative Onboarding (intro + guided actions) 1 day
P1 PWA Setup (manifest, service worker) 0.5 days
P2 Player Search + Profile View 1 day
Total estimated ~24 days

At 10-20h/week → roughly 2-3 months for a complete MVP.

Phase 2 — Social & Depth

Phase 3 — Monetization & Scale


17. Open Design Questions (Future Phases)

These decisions are deferred intentionally and should be revisited when the relevant phase begins:

  1. Faction War Mechanics: Tug-of-war (Torn-style) vs. point-based vs. territory control on a map?
  2. District Bosses: How many districts? What are the boss-gate requirements?
  3. Item Degradation Details: Linear decay? Usage-based? Repairable or permanent loss?
  4. Gambling Games: Which mini-games? (Dice, cards, slots, cyber-roulette?)
  5. Prestige Rewards: Cosmetic only or minimal stat bonuses?
  6. Crafting System: Should Chemistry/Mechanics enable crafting, or just passive bonuses?
  7. Travel System: Real-time travel between districts? Costs? Smuggling?
  8. Bounty System: Can players place bounties on each other?
  9. NPC Enemies: PvE content beyond crime (district bosses, random encounters)?
  10. Events/Seasons: Timed events, seasonal content, limited items?

18. Database Schema (Draft)

High-level entity overview for the MVP:

players
├── id (uuid, PK)
├── username (unique)
├── email
├── archetype (brawler | runner | hacker)
├── level (int, max 20)
├── xp (int)
├── hp (int)
├── max_hp (int)
├── energy (int)
├── energy_updated_at (timestamp)
├── max_energy (int)
├── nerve (int)
├── nerve_updated_at (timestamp)
├── max_nerve (int)
├── str (int)
├── def (int)
├── agi (int)
├── dex (int)
├── cash (bigint)  — unsecured, lootable
├── bank (bigint)  — secured
├── bank_withdraw_at (timestamp, nullable)  — cooldown tracker
├── hospitalized_until (timestamp, nullable)
├── protected_until_level (int, default 5)
├── created_at (timestamp)
└── updated_at (timestamp)

skills
├── id (uuid, PK)
├── player_id (FK → players)
├── skill_type (hacking | medicine | streetsmarts)
├── xp (int)
├── level (int)
└── updated_at (timestamp)

crime_ranks
├── id (uuid, PK)
├── player_id (FK → players)
├── crime_type (street_hustle | break_in | hacking)
├── xp (int)
├── rank (int)
└── updated_at (timestamp)

items
├── id (uuid, PK)
├── name (string)
├── description (string)
├── category (weapon | cyberware | crime_tool | consumable)
├── rarity (common | uncommon | rare)
├── stat_bonuses (jsonb)  — e.g. {"str": 10, "agi": 5}
├── shop_price (int, nullable)  — null = not sold in NPC shop
└── fence_price (int)  — sell value at Fence

player_items
├── id (uuid, PK)
├── player_id (FK → players)
├── item_id (FK → items)
├── equipped (boolean, default false)
├── equipped_slot (weapon | cyberware_1 | cyberware_2 | null)
└── obtained_at (timestamp)

jobs
├── id (uuid, PK)
├── player_id (FK → players)
├── job_type (corpo_it | clinic)
├── shift_started_at (timestamp, nullable)
├── shift_duration (int, default 7200)  — seconds
├── overtime_invested (int, default 0)  — nerve spent
├── collected (boolean, default false)
└── updated_at (timestamp)

combat_logs
├── id (uuid, PK)
├── attacker_id (FK → players)
├── defender_id (FK → players)
├── rounds (jsonb)  — array of round results
├── winner_id (FK → players)
├── outcome (walk_away | loot | flatline)
├── loot_amount (int, nullable)
├── xp_gained (int)
└── created_at (timestamp)

chat_messages
├── id (uuid, PK)
├── sender_id (FK → players)
├── recipient_id (FK → players, nullable)  — null = global, set = whisper
├── message (text)
├── channel (global | whisper)
└── created_at (timestamp)

transaction_logs
├── id (uuid, PK)
├── player_id (FK → players)
├── type (crime_reward | job_salary | pvp_loot | shop_buy | fence_sell | gym_fee | hospital_bill | bank_withdraw_fee | bank_deposit | bank_withdraw)
├── amount (int)  — positive = gain, negative = loss
├── balance_after (bigint)
├── metadata (jsonb, nullable)  — e.g. {"crime_type": "hacking", "crime_rank": 12}
└── created_at (timestamp)

This document is the single source of truth for Cryme City development. Update it as decisions evolve.