# Game design

## Player fantasy

You are the keeper of a five-player SunCourt club. You assemble a roster, send a frozen team snapshot into an asynchronous match, watch the deterministic replay, then live with the result. Victory is useful but costly: both clubs surrender their weakest-ranked player after the match, and the winner receives the better replacement decision.

## Core loop

1. Review the five-player roster.
2. Choose or receive an opponent snapshot.
3. Start a seeded simulation.
4. Watch possessions resolve on the court.
5. Both teams ceremonially eliminate their lowest-overall active player. Presentation remains stylized and non-graphic.
6. Loser receives one automatically generated replacement.
7. Winner chooses one player from two weighted draft candidates.
8. Save the new roster and queue the next match.

## Match rules — current physical prototype

- Five players: one Captain, Launcher, Runner, Guard, and Blocker.
- The match is untimed: the first club to reach 10 Drops with a two-Drop lead wins.
- Every physical fall into the opponent's hole is worth 1 Drop; the live court score is authoritative.
- The seeded engine supplies decisions, matchups, passes, blocks, steals, and target windows to the physical court.
- Play continues at 10–9, 11–10, and any later one-Drop margin until a club leads by two.
- Energy and team chemistry influence later possessions.
- Patient passes and bank rolls create breathing room between scoring attempts.
- The first five ranked players receive more touches, rewarding strong role assignments.
- The match seed plus frozen roster snapshots completely determine the result.

## Player ratings

- Power — force, contact, and long attempts.
- Speed — initiative, recovery, and open chances.
- Aim — scoring accuracy.
- Guard — the defensive rating used for blocks, contests, steals, clearances, and recovery.
- Grit — stamina and late-match consistency.
- Bond — how well the player improves team actions.

Overall is a position-weighted summary, not a simple average. This creates specialists whose visible overall still reflects their role.

## Rarity probabilities

- Common: 58%
- Uncommon: 27%
- Rare: 10%
- Mythic: 4%
- Legendary: 1%

Rarity affects rating floors and ceilings, but traits and position fit can make a lower-rarity player strategically valuable.

## Consequence and draft rule

The default prototype follows the requested harsh loop, but uses non-graphic presentation. `resolveAftermath()` is deliberately isolated so the consequence can later be changed, renamed, softened, or made league-specific without touching match simulation.

The lowest-overall player is selected before replacements are generated. Ties break by lowest Grit, then stable player ID. The loser receives one automatic candidate. The winner sees two candidates and selects one.

## Balance knobs

Keep all future balance changes in engine constants or data tables. Never bury tuning numbers in the interface. First tuning targets:

- Ring-score frequency
- Defensive event frequency
- Rating impact versus randomness
- Rarity odds
- Trait power
- Match length
- Winner draft candidate count

## Phase 2 sensory direction

SunCourt should feel closer to a handmade wooden labyrinth toy than a broadcast sport. Soft layered color fades suggest irregular wood grain without a straight visual grid, contacts land as quiet wooden taps, and the ambient room remains soft enough for headphones. A home-club crest is carved into center court. Scoring briefly interrupts the calm with a team-color blackout show, a warm three-note chime, and a carved honor plaque. Audio is synthesized in the browser so there are no large sound downloads and every effect can be tuned from code.

The lobby now leads with the weekly top-ten table. Club identity includes a name, color, and crest; each player also carries an individual crest and accent. Head Coach Mode allows role changes that immediately recalculate overall ranking. Career cards are ordered from safest to most vulnerable, making the life-and-death hierarchy legible before each match.

## Live court physics

The browser integrates five players per team and the ball in one animation-frame physics loop. Wood friction gradually reduces ball momentum, raised boundaries return part of the impact energy, and only physical player contact can start or redirect the steel ball. The score is not awarded until the ball actually reaches the opening and drops.

Players do not share the same reaction window or temperament. Processing combines overall ability, speed, bond, and current form. Power and grit shape hit strength; aim, bond, and form shape imperfect per-attempt accuracy; role, morale, and attributes shape aggression and defensive commitment. These values resolve into visible personality profiles such as Sentinel, Deadeye, Hunter, Relentless, Conductor, and Steady. Higher-ranked starters are also weighted toward more touches. This makes the visible motion and the deterministic result tell the same story.

There is no background ball drift, random turn, anti-stall impulse, or long-range goal force. A stationary ball remains stationary until physical contact unless it rests inside a hole's local gravity field. Players never abandon the play: attackers pursue, trail, and occupy support lanes while defenders intercept, mark lanes, and protect their scoring bowl. Player velocity and contact angle create the impact; processing and imperfect accuracy determine how much of that impact can be controlled toward the intended bank. Friction, exact outer-wall normals, hole gravity, and later player contacts govern everything afterward. Collision calculations account for the court's visible aspect ratio rather than treating the rectangular board as a square.

Once contacted, the steel ball keeps controlled momentum at an ASMR-first pace. A strict logical speed ceiling is applied before every position integration and is shared across phones, laptops, fullscreen displays, and TVs. Strong players can still create distinct touch, guided, firm, and driven contacts, but no viewport can amplify those forces. Contact overlap correction occurs only for deep penetration, preventing routine touches from visibly teleporting the ball. Holes never reflect the ball; their weaker local gravity acts only close to the opening, and any swept overlap produces a fall followed by a one-second center-court return.

The two physical ends determine scoring. The right hole belongs to the home attack and the left hole to the away attack; every fall awards that beneficiary. The last player to touch the ball identifies the scorer or an own goal. Near their own hole, defenders strongly redirect contact into a safety clearance. When the ball passes behind a barrier, the closest player from each team enters: one clears and the other tries to finish.

Open play is free-flowing rather than controlled by formation toggles. The active player attacks the ball aggressively while Captain, Launcher, Runner, Guard, and Blocker occupy distinct wide support lanes and trailing depths. The closest available player on each side is always a full-speed loose-ball chaser. A local separation force keeps nearby off-ball rollers moving apart before collision resolution, preventing ball-side huddles without disabling physical contact. Designated carriers and challengers are exempt from separation and maintain full stat-limited pursuit speed through impact. Repeated short alternating contacts trigger an angled breakout touch, while a stationary player with a distant target receives a short centerward release. Acceleration and pursuit speed remain strongly shaped by speed, aggression, and personality.

Contact is an impulse, never possession: a player cannot attach to, carry, grab, or swing the ball. The impact vector blends the physical collision normal with imperfect player aim, then adds that impulse to the ball's existing momentum before the global speed cap is applied. Deflections therefore retain part of their incoming direction and look like hits or pushes rather than animation-controlled turns.

Physical last touch owns match attribution. Each credited goal adds one glowing yellow triangle to the scorer's court token. Own goals add no mark to the defender; the last opposing player to touch the ball receives the goal and ray. Ten rays complete a sun, immediately awarding Sun God status and a persistent place in the Hall of the Sun. These match indicators reset at kickoff, while career totals and Sun God honors remain on roster cards. During the goal blackout, the center overlay shows the updated score, player number, attribution, and match total.

There is no fixed goalkeeper. The Guard is modestly favored for defensive events and recovers into a deeper roaming-sweeper lane, but remains eligible to chase loose balls, pass, hit, and join an attack. Scoring actions aim at an imperfect approach window rather than the hole center, forcing the ball through traffic and local gravity before it can fall. Patient passes remain the most common open-play action.

Court presentation uses translucent home and rival color inlays at the two ends. The source ArtCollecta PNG already contains genuine alpha transparency; the former black appearance came from its CSS backing plate. That plate is removed and the exact white/yellow mark is now permanently inlaid at center court.

After the final score is reconciled, the winning active rollers spend four seconds orbiting center court while the losing side clears to its end. MVP selection weights physical goals most heavily, then authored points, assists, blocks, steals, recoveries, own-goal penalties, and overall rating. The MVP is announced on the floor and repeated in the aftermath honors board.

Fast motion uses swept collision checks from the previous position to the proposed next position. This prevents either the ball or a player from crossing an entire hole between rendered frames. The gravity field is local to the visible depression and affects every body consistently.

Players ride inside wooden rolling spheres. Each roller has position, velocity, target, radius, visible rotation, and an in-match fall count. Speed controls acceleration and maximum rolling velocity. Autonomous steering begins well outside each danger zone, measures inward momentum, and turns the player around the rim; player-directed hole gravity is weak and confined near the lip. Hard collisions can still overpower that avoidance, so falls remain physical but rare. A fallen player respawns at center court after one second; a third fall sidelines that roller for the rest of the match, and the club continues short-handed. Player overlaps are separated and their approach velocity is exchanged before ball contact is evaluated.

## Balance and clean shingles

A match is untimed. The first club to reach at least 10 points while leading by two wins; play continues at 10–9 or 11–10. The physical court score is authoritative, and the clinching goal ends the match immediately.

A shutout is called a clean shingle. Every survivor on the winning roster gains one Grit and one Bond, and the honor is recorded on the player card.

## Sleep Practice

Sleep Practice has no opponent result, elimination, draft, or record change. Players move slowly around the live physics table while the selected procedural soundscape continues. Each real minute becomes one practice minute for every player, with only a 3% seeded chance that one player gains one point in one stat. This keeps overnight growth useful but deliberately modest.
