Merge the drill lane fix and the rate-gate sample size into staging
index.html conflicted only on the cache-buster: staging was at 276 and the branch at 275, so the merge takes 277 — a merge that reuses either number leaves phones on the old build. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
commit
0c90337f2d
5 files changed
+49
-10
No files matched your search
@@ -461,7 +461,6 @@ export const TUNE = {
|
||||
drillSeed: 4, // bodies placed at the start so there is a queue to read from the first second
|
||||
drillSeedGap: 2.6,// m of depth between those seeded bodies
|
||||
drillSpawnZ: 0.6, // z they enter at (the far baseline is 0)
|
||||
drillNearZ: 9.0, // spawn spacing is measured against bodies nearer than this
|
||||
drillSpread: 3.4, // m either side of the centre line the lanes fan across
|
||||
drillSpeed: 0.85, // m/s at the bottom of the ramp (x the type's vMul)...
|
||||
drillSpeedMax: 2.0,// ...and at the top. Stamped per body AT SPAWN — constant v is also what lets
|
||||
|
||||
+8
-4
@@ -73,15 +73,19 @@ function pickType() {
|
||||
return pool[Math.floor(Math.random() * pool.length)];
|
||||
}
|
||||
|
||||
// ---- THE STREAM. One body at a time, spaced (best-of-9 lanes against the back half — a retry loop
|
||||
// ---- THE STREAM. One body at a time, spaced (best-of-9 lanes against EVERY live body — a retry loop
|
||||
// would stall the stream exactly when it should be getting harder), holding its lane all the way in.
|
||||
// The measure used to ignore anything past the back half, which was wrong for a court where lanes are
|
||||
// held for life and speeds are stamped per body: a lane 12 m down is still OWNED, and handing it to a
|
||||
// faster body just books the overtake for ten seconds later, where it lands as two sprites walking
|
||||
// through each other mid-court. A lane is free when its body is gone, not when it is far away.
|
||||
function spawnDrillBody(d) {
|
||||
if (zombies.filter(z => z.drill).length >= TUNE.drillMaxOnCourt) return null;
|
||||
const near = zombies.filter(z => z.drill && z.z < TUNE.drillNearZ);
|
||||
const live = zombies.filter(z => z.drill);
|
||||
if (live.length >= TUNE.drillMaxOnCourt) return null;
|
||||
let bx = 0, bs = -1;
|
||||
for (let k = 0; k < 9; k++) {
|
||||
const x = -TUNE.drillSpread + (2 * TUNE.drillSpread) * (k / 8) + (Math.random() - 0.5) * 0.5;
|
||||
const s = near.length ? Math.min(...near.map(z => Math.abs(z.x - x))) : 1e9;
|
||||
const s = live.length ? Math.min(...live.map(z => Math.abs(z.x - x))) : 1e9;
|
||||
if (s > bs) { bs = s; bx = x; }
|
||||
}
|
||||
const t = pickType();
|
||||
|
||||
Reference in new issue
Block a user