Raid loop¶
Source: PROJECT_CONTEXT.md §1, §2, §3, §8.2;
config.jsmap,extraction,enemyScale;game.jscallExtraction/updateExtraction/tickWorldEvents/triggerCataclysm. Status: ✅ Implemented
What it is¶
The core session loop of Shadow Raiders. The player drops into a hostile top-down map, loots as much as possible while dodging AI mobs, bosses, and rival raiders, then tries to extract alive before a round timer ends. The genre's signature twist: no gear-loss penalty — death forfeits only this raid's loot, never equipped or stashed gear — keeping extraction tension while staying accessible to a casual mobile audience.
How it works¶
- Drop in. Procedurally placed handcrafted POIs each run; player spawns with a no-enemy safe radius around them (
map.spawnSafe). - Loot / survive / fight. The map holds rival raider bots (varying Power), AI mobs, a boss, valuable resources, chests, and extraction zones. A character or mob can only attack a target inside its vision range (fog of war + per-enemy vision cones; §3).
- Extract. Reach an extraction point, call the portal (
callExtraction), and board it. Extraction takes time and you must be clear of nearby enemies first; boarding is a presence timer (updateExtraction). Some exits close earlier than others (§8.5: Old Well @180s, Hollow Stump @300s). - Round timer → Wildmagic Storm. A 10-minute round timer (
map.roundTime600s). As it winds down, escalating one-shot world beats fire (tickWorldEvents): @420s the Wildmagic stirs and creatures grow restless (vision radius/cone bumped); @180s and @90s storm warnings; in the final 30s the storm intensity ramps and deals escalating damage (~5%/s of max HP scaled by intensity),triggerCataclysmconsumes the map — everyone still on the map dies. - No gear loss on death. Only the current raid's loot is forfeited; equipped/stashed gear is safe (§1, §3).
Player strategies the design must support (§2)¶
- Grab-and-go — take valuable loot and leave, avoiding all fights.
- Hunt mobs — kill mobs for their drops.
- Hunt rival raiders — kill other (bot) players for their haul.
- Raid special/locked zones — high-risk zones (The Vault) for the rarest loot; entry needs a key, or wait for another player to unlock it and ambush them.
- Any combination of the above.
Tunables¶
| Group | Key | Default |
|---|---|---|
map |
roundTime |
600 (s) |
map |
spawnSafe |
760 |
map |
bots |
5 (rival raiders) |
map |
roamDiv |
450 (1 roaming mob per N tiles) |
map |
coreBias |
0.45 (roaming pull toward deadly core) |
map |
ringCore / ringMid |
0.34 / 0.66 (risk-ring thresholds) |
extraction |
incoming |
0 (portal travel time, s) |
extraction |
window |
32 (open window to board, s) |
extraction |
boardPassive |
9 (board while free to act, s) |
extraction |
boardForce |
3 (rooted force-board channel, s) |
extraction |
boardBot |
9 (rival board time, s) |
extraction |
guardCap |
4 (creatures guarding one portal) |
extraction |
spawnGap / spread |
1000 / 850 (exit placement, px) |
enemyScale |
enemySpeedMul |
1.0 (non-boss speed vs player base pace) |
enemyScale |
atkCdMul |
1.5 (× on every enemy attack cooldown) |
enemyScale |
powerRef |
1500 (player Power where creatures use base stats) |
enemyScale |
hpPerPow / dmgPerPow |
0.7 / 0.5 (PvE scaling above ref) |
Design intent¶
Serves Accessible extraction (all the suspense, none of the gear-wipe punishment) and Route over reflexes — the timer + storm force a route-planning decision (how greedy can I be before I must run for an exit), and enemyScale keeps a geared raider from trivializing the map so the PvE pressure stays real. The open strategy menu (§2) is the loop's replay value.
Open questions / deltas¶
- Single-player vs simulated multiplayer (§9.3): "other players" are AI bots matched to your Power, not networked humans — consistent with the concept, but real PvP is out of scope for the prototype.
- 2.5D camera (§9.1): rendered with an isometric tilt (
map.tilt0.67, faux-height walls), not the pure flat top-down the concept names. Unity port must decide which to keep. - Added-systems carry-forward (§9.5): noise propagation, portal-guarding AI, and the storm cataclysm are prototype additions not in the concept doc; carry forward unless deliberately cut.