Files
agentic-labs-challenge/body-snatcher/docs/plans/2026-08-12-body-snatcher-design.md
T

5.0 KiB
Executable File

Body Snatcher — Game Design

Core Concept

Browser-based roguelike. You are a ghost with 1 HP and no attack. Possess enemies to fight. When your host dies, you're ejected with a countdown timer — find a new body or die.

Win: Reach the exit on floor 10. Lose: Ghost timer expires with no body available.

Core Loop

  1. Spawn as ghost on procgen dungeon floor
  2. Enemies roam with distinct AI patterns
  3. Walk into enemy + hold Space to possess
  4. Control body: stats, attack, movement
  5. Host dies → ejected as ghost, 15s timer 5b. Press X to voluntarily ABANDON a host → back to ghost (host survives, short re-possess lockout, timer resumes unfreshed)
  6. Find new body or die
  7. Collect essence from kills
  8. Descend → shop between floors → upgrade

Pacing (calm by default)

  • No friendly fire: enemies never damage each other. Enemy melee, AoE, charges, and projectiles only ever hit the player (ghost or current host). Your host's attacks still damage enemies. This stops Bombers/Chargers/Turrets from wiping the floor in seconds.
  • Aggro radius, not global hate: every enemy starts docile (idle/wander) and only chases/attacks once the player is within ~6 tiles and line of sight. Step away and it relaxes. No whole-floor swarm on spawn.
  • Slow baseline: most chasers move every 2 turns; Skitterer every 2 turns; Turret fires every 2 turns. The player chooses engagements.
  • Spawn safety: the area around spawn is kept clear of enemies.

Player Guidance and Forgiveness

  • The title screen explains every control before the player starts: WASD/arrows to move, SPACE to possess or attack, Q/E to face, X to abandon host, ENTER to confirm, and ESC to pause.
  • The HUD names the current SPACE action so each possessed body is understandable without outside documentation.
  • Shop and pause overlays show their relevant confirm/back controls.
  • The base ghost timer is 15 seconds. Ghost Tree T1 raises it to 20 seconds.
  • Controls guidance is an overlay, not a tutorial floor; gameplay still begins on floor 1.
  • An in-game enemy legend (bestiary) is reachable from the title screen and the pause menu, listing each enemy's behavior and its possessed kit.

Enemy Roster (12 types — dual system: enemy AI + player kit)

Enemy As Enemy As Player (possessed)
Brute Slow chase, heavy melee High HP, slow, big damage
Skitterer Every-2-turns loose swarm, flanks Fast, low HP, rapid weak hits
Sentinel Ranged burst then overheats, keeps distance Shoot projectiles, can't melee
Shielder Blocks frontal damage Frontal shield, must turn to hit
Bomber Explodes on death Detonate on command (suicide)
Healer Heals other enemies Heal self, AoE heal pulse
Phaser Teleports toward you Blink through walls
Turret Stationary burst fire then overheats Rooted, high DPS in bursts, 360° aim
Charger Telegraphed charge attack Dash-charge through enemies
Siren Pulls you toward it Pull enemies into melee range
Mimic Disguised as chest/item Surprise burst from disguise
Leech Drains HP on hit Lifesteal on every hit

Progression: Three Ability Tracks

Ghost Tree (enhance incorporeal form)

  • T1: Ghost time 15s → 20s
  • T2: Possession range +1 tile
  • T3: Phase through walls (1s burst, cooldown)
  • T4: Ghost Dash (quick movement while incorporeal)

Body Tree (enhance possession)

  • T1: Retain one ability from previous host
  • T2: Overclock — temporary stat boost on possession
  • T3: Dual-wield — carry two abilities simultaneously

Meta Tree (run-level benefits)

  • T1: Start each floor with a random body
  • T2: See enemy types through fog of war
  • T3: Shop discounts

Shop

Between floors. Spend essence (dropped by kills, scaled by rarity). Choose one upgrade from random selection of 3.

Systems Checklist

Criterion How
Enemy AI + pathfinding 12 distinct AI behaviors, A* pathfinding
Physics Knockback, projectile arcs, charge, gravity pull
Procgen Dungeon layout, enemy placement, item drops, shop
Save/load localStorage — save on floor transition
Economy/progression Essence currency, 3-track tree, shop
Content pipeline 12 enemies, 10 floors, escalating difficulty, achievements
Player guidance Title controls panel, contextual HUD action hint, shop/pause help
Forgiveness 15s base ghost timer, 20s with Ghost T1
Pacing No enemy friendly fire; aggro-radius activation (no spawn swarm); slow movement baseline
Bestiary In-game enemy legend reachable from title + pause

Tech Stack

  • Single index.html (HTML5 Canvas + vanilla JS)
  • Zero dependencies, zero build step
  • Open file → play

Competition Constraints

  • One-prompt challenge (Roman Coleman / Agentic Labs)
  • Harness: Pi Coding Agent
  • Deadline: Aug 17, 11:59pm MDT
  • Must include: public git repo, uncut gameplay video
  • Floor: playable start to finish, win/lose state, 10 floors, no crashes during video take