Zombies get faster over time; when one reaches you, you're eaten

splatT now ticks while in splatter mode and scales spawn speed by
1 + min(1.5, splatT/70). A zombie within 0.7m of the player ends the
run: gore burst, 'game, set, massacre', dark EATEN. overlay with final
games and a tap-to-restart (gated 0.7s so death-spam doesn't skip it).
Zombies keep shambling on the end screen but no longer score. Also
verified the two prior unverified items: quick-serve cadence (0.25s
between balls, flick = instant aimed serve) and flick aiming across
the net (far/near lane selection works as designed). HANDOFF updated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
wuwiandClaude Fable 5 committed 2026-07-11 19:54:09 +02:00
1 parent a5a6f550a3
commit 943b7da9fd
6 files changed
+58 -47

No files matched your search

+22 -43
View File
@@ -38,51 +38,30 @@ Two runtime-only import cycles (documented in headers): input↔gameplay, zombie
Ball boys mop gore they pass. HUD shows THEM instead of CPU.
- Balance knobs in TUNE (T panel): zSpeed, zSpawnEvery, zMax, zSplatQ, zPushback.
## ACTIVE TASK — Oliver's last message (his exact words):
> much better!!!
> the time between each serve is too long in zombie mode.
> right now it auto aims to the closest. i should also be able to aim anywhere includibg over the net.
> the speed of zombies should increase over time
> when they reach me i should be eaten
## ACTIVE TASK — all four items from Oliver's feedback round are DONE and VERIFIED
(serve cadence · flick-aim anywhere incl. over the net · zombie speed ramp · eaten):
Status per item (working tree runs clean, no console errors, but items 1–2 are UNVERIFIED):
1. **Serve cadence — verified.** Dead splatter ball → 15 frames (0.25s) to next pretoss;
setupPoint leaves P where he stands; FLICK in pretoss fires an instant quick serve
(no toss, pow 0.62, aimed), plain TAP still does the toss ritual.
2. **Aim anywhere — verified.** Flick up targeted a far-side zombie (marker z=5.5 for a
zombie at z=5, over the net), flick down a near-side one (z=18.1). If the lane system
still fights Oliver, next step is true free-aim (flick → landing point, splash radius).
3. **Speed ramp — done.** G.splatT ticks in updateZombies (splatter only); spawnZombie
multiplies speed by `1 + min(1.5, splatT/70)`. Verified 0.76 m/s fresh vs ~1.5 at splatT=140.
Spawn interval / zMax do NOT ramp yet — add if Oliver wants more pressure.
4. **Eaten — done.** updateZombies: zombie within 0.7m of P (splatter only) → gore + 30
particles + splat(1) + voice('game_set_massacre') + mode 'eaten', ball dead, flash cleared.
gameplay.update early-exits in 'eaten' (ticks idleT/eatenT, still updates zombies —
they shamble on; baseline crossings no longer score). render: P not drawn, dark overlay
EATEN. / games score / TAP TO PLAY AGAIN (restart prompt appears after G.eatenT > 0.7 so
death-spam taps don't skip the screen). main.js: tap/key while eaten → location.reload().
1. **Serve cadence — code DONE, not verified.**
- gameplay.js dead-ball branch: splatter overT 0.7 → 0.25, new_balls voice freq 0.2 → 0.12.
- state.js setupPoint splatter branch no longer repositions P (serve from where you stand).
- keyPressed pretoss+splatter: a FLICK now fires an instant quick serve (no toss, quality
0.62, aimed by the flick via hitServe(P, 0.62, flick)); a plain TAP still does the toss
ritual (perfect serves remain possible). hitServe gained an `aim` param.
2. **Aim anywhere incl. over the net — code DONE, not verified.**
- `zombieTarget(aim)` in gameplay.js rewritten: no aim → most advanced zombie (max z);
with aim → lane relative to the PLAYER (`P.x + ax*4`), az<0 prefers far zombies,
az>0 prefers close ones on your own side. All z candidates included.
- NOTE Oliver's complaint was that it "auto aims to the closest" — if the rewrite still
feels wrong, the next step is true free-aim: flick direction → landing point directly
(no zombie snap), with a generous splash/hit radius. Ask him which feel he wants if
the lane system still fights him.
3. **Zombie speed ramps over time — NOT DONE.**
- `G.splatT` field was added to state.js but is NEVER incremented — wire it up in
updateZombies (only while `G.mode==='splatter'`).
- Planned approach (my edit failed on a stale string, zombies.js current content is in
this repo, read it): in `spawnZombie`, multiply speed by
`1 + Math.min(1.5, G.splatT / 70)` (ramp at spawn time keeps the shot-lead math exact),
and optionally shrink the spawn interval / grow zMax with splatT.
4. **Eaten when they reach you — NOT DONE.** Plan agreed with Oliver:
- In updateZombies: `G.mode==='splatter' && Math.hypot(zb.x-P.x, zb.z-P.z) < 0.7` →
eat: gore decal + big particle burst at P, splat(1), voice('game_set_massacre', 0.8),
`G.mode='eaten'`, ball.active=false. Zombies keep shambling for ambience (guard the
eat check to mode==='splatter' so it fires once).
- gameplay.update: early-exit branch for mode 'eaten' (still tick idleT + updateZombies).
- render.js: skip drawChar(P) when eaten; dark overlay with 'EATEN.', final games score,
'TAP TO PLAY AGAIN'. Also gate the serve prompt on mode!=='eaten'.
- main.js: in the cv pointerdown listener (and a keydown), if mode==='eaten' →
location.reload() (laziest honest restart; fine for now).
- Existing baseline-cross rule (splatPoint('O') at z >= L+0.7) stays: crossing without
touching you is a point for THEM, touching you is death.
ALSO: tennis volley fix (Oliver's follow-up "impossible to volley when the marker is behind
me"): pre-bounce player contact widens reach x1.4 and swing window x1.8 (VOLLEY in config.js,
applied in trySwing + the expiry in update). Root cause was no hard block, just a ~0.28s
no-cue timing window at full ball pace; now ~0.5s. doHit also clears G.wasServe so volleying
a serve back doesn't fault-check the return. CPU still returns 11/12 serves (benchmark holds).
## Verification recipe (the regression net — use it after the above)
Drive the game deterministically via `window.T` with javascript_tool: the Browser-pane eval