Hit Show

In short

Every batted ball is shown like TV: a flight camera follows it, a glowing tracer draws its arc, and a big counter counts the feet and shouts milestones. A home run builds its score step by step and flies the total into the score panel. Big moments (a GREEN or well-timed PERFECT home run, a really long shot, a target, the scoreboard) slow down at the wall and get a full replay after the play. It is display only: the result and score are decided at contact. See Batting Feedback for how it fits with the rest.

How it works

  1. At contact, HitTally.Build reads the finished flight path from Hit Physics: feet covered at each moment, the events (milestones, apex, over the wall, target, scoreboard, landing, seats, bounces, $$$ ball) and, for a home run, the score stack.
  2. BeginHitShow starts the flight camera, the counter and the tracer. The ball plays at 1.6x speed.
  3. Counter (HitCounter, drawn by HitCounterView in the lower middle):
    • Flying: “DISTANCE” over a rolling number in FT. A tick every 10 ft, climbing a major scale (a step every 35 ft), on its own audio channel. It grows, heats up and shakes as the ball goes further.
    • Milestones fire only up to the carry distance, with a chime and a shout on the left: 250!, 300!, DEEP! (350), WAY BACK! (400), TOWERING! (450), MOONSHOT! (500), INTO ORBIT! (550), UNREAL! (600).
    • Over the wall: “GONE!” slams above the counter, with a riser sound and a small cheer.
    • Chips on the right: the target (“LABEL reward”), “SCOREBOARD SMASH!”, “IN THE SEATS!” or “UPPER DECK!”, “BOUNCE” / “BOUNCE xn” (at most 3 shown), ”$$$ +3 COINS”.
    • Landing, home run: “HOME RUN!” slams; the stack builds DISTANCE “n FT”, then the target, “GREEN” or “GREEN xn STREAK” with its multiplier, “HR POWER” with its multiplier, each with a ka-ching. The total “+n” arcs up into the score panel, which only counts the points as they arrive, then jolts, swells and flashes. See Scoring.
    • Landing, anything else: a “FOUL”, “OUT” or “OFF THE WALL” stamp over the grey distance, which sinks away, with a wood block.
  4. Tracer (BallTracer): a glowing line along the path, coloured by the counter’s heat tier, fading out after the play.
  5. Flight camera (FlightCamera): starts exactly on the batting view and tilts up after the ball for 0.35 s, then cranes up and back behind the flight, aiming a little ahead of the ball, on springs. It zooms out as the ball climbs and in as it comes down, and leans toward the landing. A home run’s camera stops 13 m short of the wall and watches the ball land in the seats (with a small kick). Grounders get a low camera. Slight bank into pans and handheld drift.
  6. Big moment slow motion: around the moment it clears the wall, the flight eases down to half speed and back.
  7. Cut back to the batter after the play card time. A home run waits until its total is delivered (a click hurries it).
  8. Big-moment replay (BigReplay), after the play: the contact close-up (InstantReplay), then a side-on tracer shot that replays the flight on an eased clock while the tracer draws the whole arc and the counter runs again, with world tags “n MPH” at the bat, “APEX n FT” and “n FT” at the landing. A click skips the whole replay.
flowchart TD
    C[Contact] --> E{EarnsReplay and not a big moment?}
    E -- yes --> CU[Contact close-up]
    E -- no --> FL
    CU --> FL[Flight: camera, tracer, counter]
    FL --> L{Landed}
    L -- home run --> ST[HOME RUN! stack, total to score panel]
    L -- foul / out --> SP[FOUL / OUT / OFF THE WALL stamp]
    ST --> BM{Big moment and replay wanted?}
    BM -- yes --> BR[Contact close-up, then tracer shot]
    BM -- no --> BV[Back to the batter]
    SP --> BV
    BR --> BV

When the big replay plays (WantsBigReplay)

All of these must hold:

  • It is a home run, and Settings REPLAYS is on.
  • It is a big moment (or Dev menu REPLAY EVERY HOME RUN is on).
  • It does not clinch the round into something that replays it anyway: when the home run reaches the goal and it is a co-op turn, or cutscenes are on and it is a boss inning or the last inning, the replay is skipped (see Cutscenes).

A big moment (HitTally.IsBigMoment) is a home run where any of these is true: the swing earns the replay (GREEN, or PERFECT zone with timing >= 0.6), distance >= the park’s long shot, it earned a target, or it hit the scoreboard.

Numbers

WhatValueWhere to tune
Long shot500 ft x (park centre field / 360 ft), centre-field share at least 0.5. Comment: about 528 Farmyard, 556 Windy City, 625 MoonHitTally.LongShotFt, LongShotReferenceCenterFt
Milestones250, 300, 350, 400, 450, 500, 550, 600 ftHitTally.Milestones
Heat tier0 below 250 ft, 1 from 250, 2 from 350, 3 from 400, 4 from 450, 5 from 500HitTally.Tier
Tracer colours by tierwhite, sky blue, yellow, orange, red, purple (HDR glow x2.4)BallTracer.TierColors
Counter colour at tier 5cycling rainbowHitCounterView.TierColor
Screen-edge glowtier 3 and up (400 ft)HitCounterView.DrawEdgeGlow
Speed linestier 4 and up (450 ft)HitCounterView
Counter tickevery 10 ftHitCounter.TickFeet
Score stack0.28 s lock, 0.34 s a step, 0.3 s hold, 0.5 s delivery (fast after a skip: 0.08, 0.09, 0.05, 0.2)HitCounter
Out stamp / fade1.1 s / 0.35 sHitCounter.OutSeconds, FadeSeconds
Big-moment slow motion0.5x, within 0.32 s of path time either side of GONE!HitTally.SlowMotion, SlowMotionHalfWindow
Flight cameratilt-up 0.35 s, crane height 4 to 24 m, stops 13 m short of the wall, grounder below 15 ftFlightCamera
Contact close-up0.35 s before contact to 0.22 s after, at 0.2x, camera 2 m away, FOV 34, orbit -15 to 20 degreesInstantReplay
Tracer shot lengthlanding time / 1.6 x 1.15, clamped 2.6 to 4.2 s, then 0.6 s holdReplayMinSeconds, ReplayMaxSeconds, ReplayHoldSeconds
Tracer width0.16 m live, 0.6 m in the replayLiveTracerWidth, ReplayTracerWidth
Scoreboard flashwhite, 0.15 sHitCounterView

In the code

FileWhat it does
Assets/_Project/Scripts/Batting/AtBatController.HitShow.csBeginHitShow, TickHitShow, FinishHitShow, WantsBigReplay, BigReplay, TracerReplay, DevReplay
Assets/_Project/Scripts/Batting/HitTally.csEvents, feet over time, score stack, IsBigMoment, LongShotFor, PlaybackScale
Assets/_Project/Scripts/Batting/HitCounter.csCounter state machine: Flying, Stacking, Delivering, Out, Fading; DisplayScore
Assets/_Project/Scripts/UI/HitCounterView.csDraws the counter, shouts, chips, stamps, edge glow, replay tags
Assets/_Project/Scripts/Batting/FlightCamera.csThe operator camera (springs, crane, wall stop)
Assets/_Project/Scripts/Batting/BallTracer.csThe tracer line
Assets/_Project/Scripts/Batting/InstantReplay.csThe contact close-up
Assets/_Project/Scripts/UI/BroadcastDraw.csShared broadcast drawing (slams, chips, overlays)
Assets/_Project/Editor/HitTallyTest.csTools > Home Run Derby > Run Hit Tally Test, on every park

Gotchas

  • The score panel lags the real round score while the total is in the air (HitCounter.DisplayScore). The round score itself changes when the ball lands.
  • REPLAYS off does not stop the contact close-up before the flight; it only stops the big replay after it.
  • A co-op spectator does not know the batter’s multipliers: the stack shows one “BONUSES” step to the real score.
  • Dev menu: REPLAY EVERY HOME RUN (PITCHING), REPLAY LAST HIT (RUN, the tracer shot only, before the next pitch), and TEST HITS (PITCHING) to force a kind of hit. See Dev Menu and Shortcuts.