Make it readable: 2x sprites, a flatter camera, honest hit timing
The umpire is situational again. Each line is tied to the thing that justifies it — a new variant appearing, the court filling, one crossing your baseline, a game lost, a horde, a changeover — behind one shared cooldown, so several triggers at once still yield one remark. The random timer pool is gone, the interval went 26s to 55s, and ump_out_of_order, ump_let and ump_no_appeal are deleted. "Visually the ball is not yet at the player but somehow the player already is hit" was real and measurable. The hostile-ball hit test reused the parry's hypot(dx, dz*0.8), and weighting depth shrinks it: contact fired while the ball was still 0.68 m up-court and drawn up around his head. It has its own unweighted test now, and contact lands at 0.25 m with the ball on his chest. The parry keeps its weighting — a racket sweep really is wider than it is deep. On "everything is a tad too small": measured first, because higher-resolution sprites are only half the answer. At RES 3 the player rasterises into 170 device pixels from a 112px source — upscaled 1.5x — while a far shambler is downscaled to 78. So near bodies needed resolution and far bodies needed the camera. Camera: pushed back and lengthened (camZ 42->48, camF 580->760) to flatten the perspective so distant bodies grow relative to near ones rather than everything zooming, camY raised for a steeper look-down, horizon re-centred. Far shambler 26->30px, boss 39->45px, player unchanged, court in the same band. Sprites: the original sheets were still in the repo at full resolution, so nothing needed regenerating — IDLE_TARGET_H went to 224 and every sheet was re-sliced. The sheet-to-output mapping was never recorded, so it was recovered by matching sliced frames to existing assets by image signature: 58 came back from sheets, the 29 without a confident match were 2x-upscaled to stay on the shared scale, since a sprite off that scale renders at half height. Tennis untouched: 50 hits / 0 whiffs. 45-game soak clean, all four chapters. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8bc57e9358
commit
49d391dc64
95 files changed
+119
-21
No files matched your search
@@ -50,8 +50,17 @@ export function fitViewport() { // landscape 480x270, portrait 270x480 with a lo
|
||||
cv.width = w * RES; cv.height = h * RES;
|
||||
// flatter lens: camZ pushed back (config 42, was 36) with camF scaled to keep the PLAYER
|
||||
// the same size — far-court zombies render ~25% bigger and actually read as zombies
|
||||
TUNE.camF = portrait ? 580 : 406;
|
||||
TUNE.horizon = portrait ? 90 : 40;
|
||||
// READABILITY PASS. Oliver's wife: "everything is a tad too small" — a far shambler on an iPhone
|
||||
// was 26 logical px tall with almost no legible detail. Pushing the camera BACK (camZ) while
|
||||
// lengthening the lens (camF) flattens the perspective, so distant bodies grow relative to near
|
||||
// ones instead of everything just zooming. camY is raised with it for a steeper look-down (bodies
|
||||
// overlap each other less at depth) and `horizon` re-centres the court after both.
|
||||
// Net: far shambler 26 -> 30 logical px, the player unchanged, the court occupying the same band.
|
||||
// If you retune these, check all four: far size, near size, court top, court bottom.
|
||||
TUNE.camZ = portrait ? 48 : 42;
|
||||
TUNE.camY = portrait ? 11 : 9;
|
||||
TUNE.camF = portrait ? 760 : 406;
|
||||
TUNE.horizon = portrait ? 45 : 40;
|
||||
buildCrowd();
|
||||
}
|
||||
ctx.imageSmoothingEnabled = false; // resets on canvas resize
|
||||
@@ -72,7 +81,7 @@ export function proj(x, y, z) {
|
||||
|
||||
// ---------------------------------------------------------------- sprites ----
|
||||
// assets/<name>.png; game falls back to code-drawn figures until sprites load.
|
||||
const SPRV = 42; // asset cache-buster — bump with main.js?v=N (see the img.src note below)
|
||||
const SPRV = 43; // asset cache-buster — bump with main.js?v=N (see the img.src note below)
|
||||
const SPR = {};
|
||||
for (const n of ['p_idle1','p_idle2','p_bounce','p_bounce2','p_toss','p_smash','p_run1','p_run2','p_swing1','p_swing2',
|
||||
'o_idle1','o_idle2','o_bounce','o_bounce2','o_toss','o_smash','o_run1','o_run2','o_swing1','o_swing2',
|
||||
|
||||
Reference in new issue
Block a user