Stadium pass: real crowd, sponsor boards, umpire visible in portrait
- Umpire chair moved courtside (UMP_X 5.6, was 7.1 — which projected to x=272 on a 270px-wide portrait canvas: literally one pixel off-screen). Tap-cheat coords follow the constant. - Generated pixel-art night crowd (x_crowd.png) replaces the tier stripes + random dots; drawn in 16 columns that bounce independently while the crowd cheers. Old procedural crowd kept as the loading fallback. - Generated courtside sponsor boards (x_ads.png): ACEADE, TOPSPIN & CO, VOLLEX, NETTO GRIP, SLAMWICH — tiled at native aspect so lettering is never half-cut at any viewport width. Replaces the 'SPLATTER OPEN' text. - One rot tint over crowd + boards driven by the shared paletteT() (new helper), so the stadium dims into splatter and brightens back for duels. Verified: fresh origin; tennis + splatter screenshots (boards tile cleanly, crowd reads, tint dims, umpire on-screen beside the court); umpire triple-tap works at the new chair position; tennis serve benchmark 33/36 across two runs (first 12 was flub noise); no console errors. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e948e8b36e
commit
1b97905217
5 files changed
+37
-23
No files matched your search
@@ -3,7 +3,7 @@
|
||||
// Module map: config (tuning/constants) · state (mutable game state) · gameplay (logic/update)
|
||||
// render (camera/drawing) · input (keys/touch) · audio (sfx/umpire) · panel (T tuning UI)
|
||||
|
||||
import { TUNE, COURT, UMP_H } from './config.js';
|
||||
import { TUNE, COURT, UMP_H, UMP_X } from './config.js';
|
||||
import { P, O, ball, score, G, setupPoint } from './state.js';
|
||||
import { update, keyPressed, solveShot, inServeBox, inCourt, forceZombies, splatPoint } from './gameplay.js';
|
||||
import { fitViewport, render, proj, RES } from './render.js';
|
||||
@@ -43,7 +43,7 @@ cv.addEventListener('pointerdown', e => {
|
||||
const x = (e.clientX - r.left) / r.width * (cv.width / RES); // logical coords
|
||||
const y = (e.clientY - r.top) / r.height * (cv.height / RES);
|
||||
if (x >= 6 && x <= 138 && y >= 6 && y <= 36) { G.logShow = !G.logShow; return; } // scoreboard tap = miss-log overlay
|
||||
const u = proj(7.1, 0, COURT.netZ);
|
||||
const u = proj(UMP_X, 0, COURT.netZ);
|
||||
if (Math.abs(x - u.x) > 16 || y > u.y + 6 || y < u.y - UMP_H * u.s - 8) return;
|
||||
const now = performance.now();
|
||||
umpTaps = umpTaps.filter(t => now - t < 1600);
|
||||
|
||||
Reference in new issue
Block a user