Let the player choose a court before the match
Three courts, picked on a second start-screen stage: CENTRE COURT (grass), TERRE ROUGE (clay) and THE SLAB (hard). A court is a row in config.COURTS and four PNGs — render() never learns their names. Each row carries two palettes, because every court still rots: what "drained" means on orange clay is not what it means on green lawn. Mow stripes became a flag rather than a colour — recolouring the lawn and leaving the bands on still read as grass. Bounce is two numbers copied into TUNE on selection, so the three bounce sites in gameplay.js and the T panel stay untouched: grass skids low and fast, clay sits up and drags, hard is the old baseline. Per-court crowd sheets and ad strips. Each court's clap frame is generated from its OWN seated sheet, not from x_crowd2 — pairing one court's crowd with another's applause cross-fades between two different crowds. The picker is a second panel in the existing #intro overlay, rows built from the table. Last pick is remembered and comes up pre-highlighted; 1..N or Enter on a keyboard. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6378ff2a1b
commit
fa30fb94c4
15 files changed
+166
-36
No files matched your search
@@ -268,6 +268,42 @@ export const EATEN_FEED_R = 1.15; // m — how tight the feeding ring packs arou
|
||||
export const UI = { hot: '#d9705f', warm: '#e0cc72', pick: '#cbd06a', cream: '#e8e8dc',
|
||||
dim: '#8fa0b8', bad: '#a34a42', ball: '#dbe063' };
|
||||
|
||||
// ------------------------------------------------------------------ courts ----
|
||||
// A court type is pure DATA: adding one is a row here plus its four PNGs, never a change to render().
|
||||
// Each carries TWO palettes because every court still rots — `tennis` is how it looks before the
|
||||
// horde arrives, `splatter` is the drained version render.js lerps to (see paletteT).
|
||||
// stripes mown lawn bands. Grass only: clay and acrylic are laid flat, and drawing stripes on
|
||||
// them was the single thing that made a recoloured court still read as grass.
|
||||
// line painted line colour. Chalk-white reads on green and blue; on clay it has to go warmer
|
||||
// or the lines glow like neon.
|
||||
// ads/crowd sprite BASE names; the clap frame is <crowd>2 (see the two-frame note in render()).
|
||||
// bounceY/XZ copied into TUNE on selection, so the T panel keeps editing the live values and the
|
||||
// three physics call sites never learn that courts exist. Grass skids low and fast, clay
|
||||
// sits up and drags, acrylic is the middle it always was.
|
||||
export const COURTS = [
|
||||
{ id: 'grass', name: 'CENTRE COURT', sub: 'GRASS · fast, low skid', tile: 'court_grass',
|
||||
ads: 'x_ads', crowd: 'x_crowd', stripes: true, line: '#e8e8dc', border: '#e8e8dc',
|
||||
bounceY: 0.50, bounceXZ: 0.84,
|
||||
tennis: { stands: '#232e42', tierA: '#2a3750', tierB: '#26324a', board: '#0e5c2e',
|
||||
out: '#295c2d', lawn: '#4cae52', stripe: '#46a54c' },
|
||||
splatter: { stands: '#181426', tierA: '#201a33', tierB: '#1c172e', board: '#3a1212',
|
||||
out: '#20331c', lawn: '#5e7747', stripe: '#576f42' } },
|
||||
{ id: 'clay', name: 'TERRE ROUGE', sub: 'CLAY · slow, high kick', tile: 'court_clay',
|
||||
ads: 'x_ads_c', crowd: 'x_crowd_c', stripes: false, line: '#efe3cf', border: '#efe3cf',
|
||||
bounceY: 0.66, bounceXZ: 0.70,
|
||||
tennis: { stands: '#4a3025', tierA: '#5a3a2c', tierB: '#513428', board: '#8a4426',
|
||||
out: '#7a3f26', lawn: '#c4652f', stripe: '#c4652f' },
|
||||
splatter: { stands: '#2a1a18', tierA: '#33201d', tierB: '#2d1c19', board: '#3a1212',
|
||||
out: '#4a2a1c', lawn: '#8a4a2a', stripe: '#8a4a2a' } },
|
||||
{ id: 'hard', name: 'THE SLAB', sub: 'HARD · true bounce', tile: 'court_hard',
|
||||
ads: 'x_ads_h', crowd: 'x_crowd_h', stripes: false, line: '#f2f4f8', border: '#f2f4f8',
|
||||
bounceY: 0.58, bounceXZ: 0.78,
|
||||
tennis: { stands: '#1d2836', tierA: '#243141', tierB: '#1f2b3a', board: '#12525e',
|
||||
out: '#2c7a52', lawn: '#1f5c93', stripe: '#1f5c93' },
|
||||
splatter: { stands: '#141a26', tierA: '#1a2130', tierB: '#161d2a', board: '#3a1212',
|
||||
out: '#25452f', lawn: '#1c3e5c', stripe: '#1c3e5c' } },
|
||||
];
|
||||
|
||||
// netW was the singles-stick width (10.06) while the court is drawn to the DOUBLES lines, so the
|
||||
// net stopped 0.46 m short of each sideline and visibly failed to meet the court edge. The posts
|
||||
// now stand exactly on the doubles sidelines.
|
||||
|
||||
Reference in new issue
Block a user