Sound: recorded SFX layer + a touch-easier CPU
Wire the new assets/audio/*.wav samples over the synth SFX: - Ball hits: per-side tennis-player / tennis-opponent on serve & return, now with a stadium reverb tail (same convolver as umpire/aww). - Crowd: tennis-applaus on your points/games (louder on big moments); tennis-aww when the opponent scores or you're eaten (reverb tail). - Ambient bed: tennis-ambient-loop from first tap, 500Hz lowcut, low vol. - Zombie music: zombie-mode loop when splatter kicks in (800Hz lowcut), fades out for the 1:1 sudden-death duel and back in after. - Headshots: random headshot-1/-2 on every zombie kill (killZombie). audio.js: sfx() one-shot player w/ rate+reverb opts, loopBed() beds with duck/fade, aww() wrapper, hotter reverb send on the umpire voice. Also: normal opponent aiFlub 0.09 -> 0.14 (a little easier to beat). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
88e46a62b8
commit
eacad1ffca
13 files changed
+75
-13
No files matched your search
+3
-2
@@ -5,7 +5,7 @@
|
||||
|
||||
import { TUNE, COURT } from './config.js';
|
||||
import { G, P, ball, sendBoy, setupPoint } from './state.js';
|
||||
import { splat, moan, pock, voice, boom, swish, shriek } from './audio.js';
|
||||
import { splat, moan, pock, voice, boom, swish, shriek, aww, sfx } from './audio.js';
|
||||
import { splatPoint, cheer, spentBall, resolveInterlude } from './gameplay.js';
|
||||
|
||||
export const zombies = []; // {x, z, v, walkT, variant: 'a'|'b'|'c'}
|
||||
@@ -64,6 +64,7 @@ function killZombie(i, quiet) {
|
||||
t: dark ? 0.6 + Math.random() * 0.6 : 0.4 + Math.random() * 0.4, dark,
|
||||
}); }
|
||||
splat();
|
||||
sfx('headshot-' + (Math.random() < 0.5 ? 1 : 2), 0.6); // random headshot crack layered on the gore burst
|
||||
sendBoy(zb.x, zb.z); // a boy sprints out to mop
|
||||
if (!G.horde) splatPoint('P', quiet); // a horde is survival — it doesn't score, so it can't chain into itself
|
||||
}
|
||||
@@ -195,7 +196,7 @@ export function updateZombies(dt) {
|
||||
t: 0.5 + Math.random() * 0.5,
|
||||
});
|
||||
splat(1);
|
||||
voice('game_set_massacre', 0.8);
|
||||
voice('game_set_massacre', 0.8); aww(1); // the run is over — the crowd groans
|
||||
G.mode = 'eaten'; ball.active = false; G.flash = null; // zombies keep shambling for ambience
|
||||
G.horde = null; pellets.length = 0; extras.length = 0; G.mgT = 0; // everything stops; the eaten screen takes over
|
||||
try { // the run is over — settle it against the best (games survived, sets as tiebreak)
|
||||
|
||||
Reference in new issue
Block a user