Commit 8601c8

2026-09-22 22:45:01 Anonymous: Implement Entrance Sector ordinary enemy schedule, admission and retirement rules
hold the flood/threat.md ..
@@ 1,59 1,58 @@
# Threat
- The owner requested a playable trial of the Threat spawning handoff on 22 September 2026, then doubled its speed, spawn rate, caps and health. This page describes the current revised trial. The numbers are initial tuning; the stationary two-pistol target is about two to three minutes before being overwhelmed, not a death timer. Difficulty never reads the player's equipment.
+ The astronaut moves through the Entrance Sector while the approaching crowd changes: fragile bodies, slow obstacles, quicker pursuers, then a large fragile crowd and a quieter interval. The Promenade, Waiting Areas and Cafeteria share this sequence. Moving between them changes the available routes, while the encounter clock continues.
- ## Owner tuning revision — 22 September 2026
+ ## Zones and time
- > I don't love it yet. let's increase double all starting values: speed, spawn rate, max amount, and hp. for now, keep the increasing ratio as is, and we'll try again.
+ The Entrance Sector is one zone. Later zones will have their own enemies, rules, schedules and higher baseline difficulty; they replace Vampire Survivors' separate stages in this game's structure. Within Entrance, room identity and distance from the Dock add no numerical difficulty multiplier. The [Owner Brief](/Hold%20The%20Flood/Brief) records the direction and trial authorization.
- The current table doubles enemy movement speed, spawn attempts per second, connected-chain caps and absolute health at every Threat value. Multiplying the complete curves by two preserves their progression ratios and stage times. This progression revision retained damage, enemy mix, first-attempt grace, chest timing and static encounter tuning; the later global attack-timing revision below also applies to defined static enemies. Birth snapshots remain: existing enemies retain their saved stats; new enemies use the revised curve. Start a fresh departure to compare the revised opening consistently.
+ Threat gains one second per running second that the living astronaut spends in dynamic unsafe rooms. Safe and static unsafe rooms stop its advance; ordinary world time and oxygen continue. Pausing stops it. Returning or dying retains the final value; a new departure resets it. Saving and loading add no time. Doors and room crossings grant no reset or new grace. Only the player's active connected dynamic combat area receives new enemies.
- ## Rooms and time
+ Safe rooms exclude enemy spawning, movement and attacks into them. Static unsafe encounters retain their separate rules. Bosses belong to specific rooms and are not scheduled by Threat.
- - **Safe rooms:** enemies cannot appear in them, enter them or hit into them.
- - **Static unsafe rooms:** the room defines its own combat and rewards. This remains available for authored fights and bosses.
- - **Dynamic unsafe rooms:** one shared **Threat** counter determines enemy settings. Room identity, location and distance from the Dock add no difficulty modifier.
+ ## Entrance schedule
- Threat gains one second for each running second the living astronaut spends in a dynamic unsafe room. It carries across rooms and disconnected chains. Safe/static rooms pause it; ordinary oxygen and world time continue there. Pausing the game or suspending the application adds no Threat. Saving/loading adds no time. Returning or dying retains the final value; only starting a new departure resets it.
+ The first ordinary spawn opportunity is at three Threat seconds, once per departure. Later opportunities follow the refill rate below. Rates are constant within each row. New-spawn probabilities are independent choices, not forced ratios among surviving enemies.
- The Western Promenade, Waiting Area and Cafeteria use dynamic unsafe combat. Their former finite fights and clear rewards no longer run on new departures. An already-active save from before Threat finishes that departure with the old encounters, then switches on the next departure. Existing property is preserved.
+ | Threat | Nearby target | Maximum refill per second | Crowd / Heavy / Runner |
+ |---|---:|---:|---|
+ | 0:00–1:00 | 18 | 2 | 100% / 0% / 0% |
+ | 1:00–2:00 | 28 | 3 | 85% / 15% / 0% |
+ | 2:00–3:00 | 42 | 5 | 75% / 15% / 10% |
+ | 3:00–4:00 | 50 | 6 | 90% / 0% / 10% |
+ | 4:00–5:00 | 32 | 3 | 75% / 25% / 0% |
+ | 5:00–6:00 | 58 | 7 | 85% / 0% / 15% |
+ | 6:00–7:00 | 64 | 7.5 | 65% / 20% / 15% |
+ | 7:00–8:00 | 76 | 9 | 90% / 0% / 10% |
+ | 8:00–9:00 | 44 | 3.5 | 100% / 0% / 0% |
- ## Enemy progression
+ At 9:00 the last three rows repeat: mixed crowd, large fragile crowd, reduced reinforcements. At 9:00 use the 6:00 row, at 10:00 the 7:00 row, at 11:00 the 8:00 row, then repeat. The actual clock never rewinds. There is no further stat escalation, repeated grace or restoration of defeated enemies.
- | Threat seconds | Spawn attempts per second, start → end | Living enemies per connected chain | Weak / Tough / Flanker | Damage multiplier | Speed multiplier |
- |---|---:|---:|---|---:|---:|
- | 0–60 | 1 → 2.5 | 30 | 100% / 0% / 0% | 1.00 | 2.00 |
- | 60–120 | 2.5 → 3.5 | 40 | 85% / 15% / 0% | 1.00 | 2.00 |
- | 120–240 | 3.5 → 5 | 60 | 70% / 20% / 10% | 1.00 | 2.00 |
- | 240–360 | 5 → 6.5 | 80 | 60% / 25% / 15% | 1.15 | 2.10 |
- | 360–540 | 6.5 → 8 | 100 | 50% / 30% / 20% | 1.30 | 2.20 |
- | 540 onward | 8 | 120 | 45% / 30% / 25% | 1.50 | 2.30 |
+ [Combat And Enemy Roster](/Hold%20The%20Flood/Combat%20And%20Enemy%20Roster) owns the effective fixed role cards, hit displacement, melee protection and presentation. These replace the earlier continuous HP curve and speed/damage multipliers for new Entrance enemies. An existing enemy keeps its saved birth HP, speed and damage; a phase change does not heal it or change its type.
- Spawn rate rises linearly within each interval. The other columns change at the start of each interval. Each successful spawn rolls its type independently; these are chances for new enemies, not quotas for survivors.
+ ## Local crowd and connected cap
- Health uses absolute values, interpolated linearly between these anchors. Fractional health is kept. Do not multiply by the old enemy health. After 540 seconds it stays at the last anchor.
+ The nearby target counts living dynamic enemies reachable within 30 metres of navigable path through the active connected combat area, including around corners and through open doors. It is an admission target, not a guaranteed onscreen count. An enemy's own footprint is used for its route, including full wall clearance at furniture detours; a gap narrower than that body is not a shortcut. Camera rotation does not change the count.
- | Threat seconds | Weak health | Tough health | Flanker health |
- |---|---:|---:|---:|
- | 0 | 2 | 12 | 4 |
- | 60 | 12 | 32 | 8 |
- | 120 | 32 | 72 | 18 |
- | 180 | 48 | 100 | 28 |
- | 240 | 60 | 128 | 36 |
- | 360 | 80 | 172 | 48 |
- | 540 onward | 110 | 232 | 66 |
+ The hard admission cap is 120 living dynamic enemies in the active connected area, including distant bodies and enemies with lethal shots in flight. Corpses do not count. Open traversable dynamic-to-dynamic doors join an area; safe/static rooms, locked doors and unbuilt destinations do not connect it. Count retained bodies immediately when areas reconnect. A joined population may already exceed 120; new admissions then wait until below the cap. This is a connected-area ceiling, not a promise of 120 total across disconnected parts of the sector.
- Underlying Weak and Tough cards have 1 m/s and 5% of full astronaut health per strike; the Flanker card has 2.4 m/s and 8% per strike. The revised Threat speed multiplier starts at 2, giving Weak/Tough 2 m/s and Flankers 4.8 m/s. Damage is unchanged. Attack reach and body sizes remain. The later [enemy attack-timing revision](/Hold%20The%20Flood/Combat%20And%20Enemy%20Roster) shortens all defined windups to one tenth and sets every recovery to one second. Weak/Tough melee windup is 0.10 seconds and Flanker melee windup is 0.06 seconds. Ordinary melee retains its normal body colour during both phases; special-attack telegraphs remain available. Each body keeps the health, speed and damage it had at birth; a new stage never heals or changes an existing body. No extra enemy abilities or combat-upgrade rewards are added.
+ Each spawn opportunity requires a population below both limits and a legal position. A failed or capped opportunity is spent, with no later catch-up burst. A lower target stops reinforcements while too many enemies remain; it does not erase survivors. A strong build may clear bodies faster than refill and keep the fight below target. Equipment, health and kill speed do not make the director retaliate with stronger or faster replacements.
- ## Connected crowds
+ ## Placement and abandoned enemies
- Open, traversable doorways connect dynamic rooms into a chain. Locked doors, safe rooms, static rooms and unbuilt destinations do not bridge it. Unvisited and off-camera rooms count. The cap counts all living dynamic enemies in the chain, including those with lethal shots still on the way. Corpses do not count. Joining two chains keeps every survivor; if the combined crowd exceeds the cap, spawning waits until it falls below it. Opening a door grants no refill, clock reset or new grace period.
+ New enemies need clear floor, a route within the active area, at least eight metres from both the game and controller positions of the astronaut, and at most 30 metres of navigable route to the player. Placement uses the common largest current footprint before rolling a role. Prefer legal floor near the unseen camera boundary, within the existing six-metre search band. Use the current viewport test with its margin: a wall hiding an onscreen point does not make it an offscreen spawn point.
- Only the astronaut's current chain receives new enemies. Survivors elsewhere keep their positions, injuries and normal world-time behavior. Dynamic and static enemies stay on their own side of the boundary. The astronaut can still shoot outward from safety.
+ There is no visible farthest-point fallback. If unseen legal floor is unavailable, discard the opportunity. This can suppress arrivals even with space under both population limits. Existing enemies may walk into view through a doorway. Numerical sampling enforces the placement rules; it does not guarantee a successful spawn whenever some theoretically valid point exists.
- The first attempt is at three Threat seconds, once per departure. Later attempts follow the accumulated spawn rate, preserving partial progress across room changes, pauses and saves. A capped or failed attempt is spent; it never builds a catch-up burst.
+ After finding a legal slot, choose the role using a separate saved random stream. Target, cap and placement failures consume no role draw. Position sampling and reward randomness have their own streams. New bodies are alerted and walk toward the player.
- New enemies need clear reachable floor in the active chain, at least eight metres from the astronaut. Placement uses the largest current enemy footprint before rolling its type, so tight geometry does not selectively reject Flankers. Prefer floor outside the camera near its nearest legal edge, within a six-metre distance band. If no unseen place works, use the farthest legal place. Keep the eight-metre minimum even when placement fails. New bodies are alerted and must walk to the player; no teleporting replacements.
+ An ordinary dynamic body that remains unseen and beyond the nearby route boundary for 15 active Threat seconds is removed without a combat kill or corpse. No reachable path also counts as distant inside the active area. Visibility, proximity or an active attack/projectile/control interaction resets that removal timer. Safe/static time, pause time and time outside the active connected area freeze it. Reevaluate distance and visibility on resumption. Nearby and visible survivors persist across phase and room changes. A replacement must pass normal admission and refill rules; it is never teleported beside the player.
+
+ ## Saved departures
+
+ Threat, partial spawn progress, all three random streams, enemy birth stats, remote-removal progress and short combat-control timers survive reload. Earlier Threat saves preserve their time, property, existing enemies and reward ledger; the new role stream is initialized deterministically without advancing the older streams. New births follow this schedule. A fresh departure starts the new encounter sequence consistently.
+
+ An active save from before Threat still finishes its old finite encounters and switches at the next departure. No new-game reset is required. Static/legacy encounters retain their prior combat-response rules; the new contact/displacement rules belong to the ordinary dynamic Entrance roles.
## Chests
@@ 73,20 72,11 @@
At the next departure, unplaced and unopened rewards expire, the counter and event ledger restart, and the configured deck is reshuffled. Drawn items left in opened containers remain accessible at their saved locations and never consume the new deck. Ordinary static-chest property rules remain.
- ## Validation
-
- The shortened attack timing and removed melee colour changes passed 298 Core and 82 Unity tests, including focused checks of the full attack/recovery cycle and visual states. The progression-only combat measurements below predate this attack revision and are not measurements of its balance. Owner playtesting of the new attack timing remains pending.
-
- The doubled tuning passes all **367 tests (288 Core +79 Unity)**. Repeating the same actual-furniture stationary two-pistol check with enemy seed404/chest seed505 gave defeats at **1:31.68 in the Promenade,1:26.63 in the Waiting Area and1:27.07 in the Cafeteria**. These are single-seed diagnostics, not averages or moving-player balance. The owner's exact doubling is retained for the next playtest. Existing enemies keep their saved birth stats; new departures provide a consistent fresh trial.
-
- The following combat measurements describe the previous, undoubled version and must not be treated as current balance results.
-
- The implementation passed **367 tests: 288 Core and 79 Unity**, covering progression, chain caps, clock boundaries, randomness, deck reservations, pending rewards, static support, saves/migration, furniture routes and actual chest/controller interaction. A live reload exposed an existing host issue returning the player to the Dock despite a saved position; this is corrected, with a regression test and live reload verification in the Waiting Area.
-
- Live checks confirmed an earned chest appears with the ordinary E prompt, draws one full Oxygen Tank into the pack, and retains its opened state and consumed card through reload. Ten seconds in a safe room left Threat unchanged; one second back in a dynamic room added one second. Returning kept the final Threat; the next departure reset it to zero and restored twelve deck cards. Owner save files were protected during testing and restored byte-for-byte afterward. New departures use Threat; an active pre-Threat save can be completed normally before starting the new system.
-
- Three isolated combat checks used actual room furniture, one fixed seed per room, a stationary astronaut with two Service Guns, fixed camera framing and 1/60-second steps. Defeat occurred at **4:04 in the Western Promenade, 3:43 in the Waiting Area and 2:59 in the Cafeteria**. These are individual diagnostic runs, not averages or a proven balance result. They use identical Threat settings; room geometry and crowd movement still affect the outcome. The two-to-three-minute target is therefore not confirmed across the rooms. Those earlier checks kept the handoff's tuning unchanged; the owner subsequently doubled the four values above. Moving-player, broader-seed and later-departure balance require play feedback.
+ ## Open questions
- An initial unbounded diagnostic stalled the editor; no balance conclusion came from it. Bounded replacement checks exposed and corrected chest enclosure and repeated path-search work. The three successful runs had worst individual simulation steps of roughly43–50ms on this machine; this does not establish rendered frame-rate performance.
+ Verification for this trial: all 354 Core and 90 Unity tests pass, including placement with the real furniture and camera in each Entrance room at two camera angles. The three role appearances were inspected in all three rooms at normal camera distance. These checks establish rule behavior and rendering, not difficulty, sustained-density performance or moving-player feel.
- Spawn placement uses numerical floor sampling and a small boundary refinement; chest placement uses sampled radial candidates. These enforce distance, clearance and reachable-path rules but are numerical approximations to the ideal nearest/farthest continuous positions. No illegal closer spawn or overlapping placement is used as a fallback.
+ - This is an implemented first trial with initial tuning. Moving-player feel, long visits, crowd readability and performance at sustained density need play feedback.
+ - The stationary two-starting-pistol run is a diagnostic, not a target for defeat at two to three minutes. Earlier measurements belong to older tuning and are not current balance evidence.
+ - If offscreen/route constraints suppress pressure widely, compare a clearly signalled visible arrival with a more distant route-fed arrival explicitly.
+ - Future zone transitions need their own clock and revisit policy. Passing rushes and additional ordinary roles are later work.
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9