ferravex
GitHub

Mooncourt

Win the Earthrise Cup across six lunar courts. Mooncourt is a finite singles racket tournament: place shots into open space, move to meet the incoming ball, and decide when to spend stamina on an attacking smash. An airborne ball, its ground shadow and its landing ring are separate cues. Returns depend on position, height and timing; the rivals move and strike under the same physical court and ball rules. The screen explains itself with icons, meters and motion rather than sentences.

Play

cargo run -p mooncourt --offline --locked -j 2

The shared host provides the title, pause, paginated guide, remapping, sound, retry and completed-run records. Enter starts the host; Space enters the first court after its opponent briefing. The model does not save unfinished matches.

ControlAction
Arrows / WASDMove across your half of the court
1 / 2 / 3Aim left / center / right on the rival's half
Click a third of the rival's court, or the aim stripChoose the same aim lanes
Space / EnterDrive, serve, enter court or confirm retry
X / EHigh recovery lob
C / QFast stamina-consuming smash
1 / 2 / 3 between matchesTrain footwork / endurance / racket reach
Click a training cardPurchase the corresponding free training level
Space, or click Skip, between matchesSkip training and proceed
Click Play / Retry on a court cardSame as Space: enter the court or spend a wildcard
HField guide; arrows turn pages
Esc / PPause
RRestart the entire tournament
M / F2Sound / control bindings

Movement uses held keys. Shots use fresh press edges; holding a shot button does not repeatedly swing. Mouse input selects targets and card buttons (they lift under the pointer); movement and swings use the keyboard by default. The guide (H) holds four short reminders after the key-cap page.

Reading the screen

Tournament and rivals

Each match is best of three games: the first athlete to win two games advances. Games use 0, 15, 30, 40, deuce and advantage. Win at least four points with a two-point lead. Service changes after each game. This is a compact house format: there are no sets, second serves, doubles alleys or diagonal-service-box faults. A serve starts from the baseline and may target any of the three lanes.

CourtRivalStyle
Tycho SchoolPipPatient, slower baseline play; introductory timing
GlasshouseVegaAttacks the corner furthest from you
Basalt GardenOrinFast baseline coverage and alternating deep drives
Crescent TerraceNixHigh moonballs that demand height-aware timing
Mare ArenaSolQuick smashes and shorter angled returns
Earthrise CenterRegent IoFast reactions and a mixture of all shot types

The courts have distinct palettes, briefings and gravity values. Rivals have bounded movement speeds, acceleration, reaction delays and stamina. Their shot choices depend on their authored style and the current rally; they do not receive scripted misses or an autoplay handicap.

Winning a match offers one free training level. Footwork adds 15 movement units per second, endurance adds 5 stamina per second, and racket training adds 4 units of reach. Each track caps at three levels. A 2-0 win earns three medals; a 2-1 win earns two. The sixth victory awards the Cup and freezes the tournament on its ending screen.

A lost match offers a wildcard retry. Three wildcards are available across the whole tournament; a fourth match loss ends the run. Retrying preserves earlier victories and training, resets that match and stamina, and rolls its score back to the opening total. Lost attempts cannot farm campaign score.

Ball, timing and stamina

The court is a real two-dimensional movement space, with a separate ballistic ball height. Shots cross a net whose height is checked at the actual crossing. The first bounce must land inside the opposing singles court. A second bounce, net fault or out ball awards the point. A ball that passes beyond the receiving area after its legal bounce also awards the point to its last hitter.

The colored landing ring shows where the flight will first touch the ground. The small pale shadow shows the current ground position, and the line above it turns gold while an incoming ball is low enough to hit. Move to the landing region, then step toward the net to intercept the ball earlier and higher. Your reach ring turning gold and the shot keys lighting up mean the ball is within racket reach. The swing window lasts ten ticks; its cooldown lasts twenty. The racket cannot strike a high ball, a distant ball or your own outgoing shot.

ShotStamina cost after contactFlight timeUse
Drive71.25 secondsReliable placement and ordinary rallies
Lob42.35 secondsGain recovery time and invite an overhead reply
Smash260.86 secondsAttack open space from a sufficiently high ball

Each attempted swing also costs 2 stamina. A smash requires at least 26 remaining stamina and ball height of at least 14; otherwise the return becomes a drive. A low attacking shot near the net can catch its tape. Serves use a safe 1.6-second drive. Stamina recovers at 13 per second before training, plus 30 between points; movement slows to 80% below 12 stamina.

Each point won earns 50 plus twice the rally length, capped at 20 strokes for that bonus. A game earns 200. A match earns 800 plus 100 per medal. The ending shows matches won, medals, aces and the longest rally as icons; an ace is a point your serve wins untouched.

Strategy

Choose a lane away from the rival before you swing. Returning from the baseline usually produces a low drive; moving a little toward the net gives a higher, faster attacking opportunity. Recover toward the middle after a wide shot so you can reach either reply. Use lobs when out of position, and do not chase the ball's airborne drawing instead of its ground shadow. Sol's short angles require forward movement as well as lateral coverage. Io is beatable through the same placement and stamina choices used against earlier rivals.

Validation and implementation

model.rs owns fixed 60 Hz rules, content.rs owns the six opponents, and view.rs draws the court and interface without changing the game. Each step records a short presentation feed (hits, bounces, how a rally died, points, games, refusals) that the rules never read; view.rs turns it into effects at the place each event happened. The rules reuse Ferravex math and ferravex_play::motion::approach_vec2. The shared Arcade host owns platform input, lifecycle, sound, records and window fitting. There are no external libraries, assets or services.

cargo test -p mooncourt --offline --locked -j 2
cargo clippy -p mooncourt --all-targets --offline --locked -j 2 -- -D warnings
cargo run -p mooncourt --offline --locked -j 2 -- --headless

The suite executes 21 behavioral tests and one public API doctest. It covers movement and serving boundaries, real racket reach and height, press-only swings, shot trajectories and costs, fallback shots, net/out/bounce decisions, deuce and service changes, training, wildcard rollback and whole-run loss. Presentation tests cover header progress at the first and final match, effects for returns, smashes, smash fallbacks and refused training, aces, the court-click aim path (identical to the number keys) and the Retry/Skip buttons (identical to Space). A separate complete tournament test starts at Game::new, consumes only ordinary pilot inputs, visits all six matches and verifies terminal invariance and an identical same-host replay.

The final legal pilot wins at tick 19,689 (about 5 minutes 28 seconds of simulation), with all 18 medals, all three wildcards, 11,712 points, 66 returns, 4 aces and a longest rally of 13. This is automated completion evidence, not a human skill estimate or balance study. Native screenshots of the title, play, cards, help and ending were reviewed; browser, combined build, device audio, physical mobile/controller play and cross-platform bitwise determinism have not been verified by this task.