Batting Feedback

In short

Before the swing the game shows where to hit (the aim helper, the pitch chip, the optional timing ring) and what you hold (the PULL / NORMAL / OPPO, DRIVE / NORMAL / LIFT box). At contact it shouts a grade (WEAK! GOOD! GREAT! PERFECT! GREEN!), freezes for good hits and plays a crack sized by exit velocity. In flight a counter, tracer and TV camera show how far. After, a play card gives the numbers and TIMING: EARLY / LATE / ON TIME. The weak spot: the game rarely says why a swing was bad (tip or handle, too high or low, aimed wrong). See Gaps and ideas.

How it works

flowchart LR
    B[Before: aim helper, pitch chip, special-ball cue, hit aim box, timing ring] --> S[Swing: whoosh]
    S --> M{Contact?}
    M -- no --> W[Ooh, glove pop, SWING AND A MISS card: SWUNG EARLY / LATE / ON TIME]
    M -- yes --> G[Grade popup, crack, ping, hit stop, GREEN flash + shake]
    G --> F[Flight: TV camera, tracer, live FT counter, shouts, chips]
    F --> R[Landing: HOME RUN! score stack / FOUL / OUT stamp, crowd]
    R --> C[Play card until the next release]

Before the swing

  • Aim helper (AimBat): two warm-gold curves with a dark ink edge, at the bat’s tip and where the barrel tapers. The sweet spot is the gap between them, on the mouse aim. Its height follows your contact reach (Contact and Timing Window stats). A soft glow breathes every 2.4 s. The tip points right, the handle left.
  • Strike zone: a white outline at 50% opacity.
  • Pitch chip bottom-left: “CURVEBALL 78 MPH”, or with a special ball “ANTI-GRAVITY CURVEBALL 78 MPH” in that ball’s chip colour. A special ball also glows in the pitcher’s hand and plays a cue at the windup. See Special Balls.
  • Hit aim box (above the key hints, not shown to spectators): row “A / D” with PULL / NORMAL / OPPO, row “S / W” with DRIVE / NORMAL / LIFT. The held one turns orange; NORMAL is blue when nothing is held.
  • Key hints: MOUSE AIM, SPACE / CLICK SWING, A/D W/S AIM HIT, ESC PAUSE.
  • Timing ring (Settings: TIMING RING, off by default): a ring around where the pitch will cross, shrinking to the ball. White = too early, yellow = you would make contact, green with a second halo ring and a pop = a press now would be GREEN. After you swing it freezes in that colour for 0.35 s. See Timing ring agreement (TimingWindowScanner).
  • Sound: the pitch whir (higher for faster pitches), then a glove pop when the ball reaches the plate unhit.

At contact

  • Grade popup at the top centre for 1.3 s: “WEAK!” grey, “GOOD!” sky blue, “GREAT!” green, “PERFECT!” yellow, or “GREEN!” / “GREEN! x2” in bright green, bigger (48 vs 38) and slammed in harder. Contact only; nothing for a whiff.
  • Hit stop: the game slows to 0.05 speed for 0.16 s on a GREEN, 0.09 s on GREAT or PERFECT.
  • Crack: green crack on a GREEN; else by exit velocity: soft below 78 mph, medium below 96, hard from 96. A ping follows 0.03 s later when quality is at least 0.55 (“you hit it well”). A GREEN adds a small cheer, louder and higher with the streak (capped at 5).
  • GREEN only: a green-white screen wash (0.25 s), a camera shake (0.22 s), a green ball trail, and “GREEN STREAK xn” under the score from 2 in a row.
  • Contact close-up (GREEN, or PERFECT timed 0.6 or better, when it is not a big moment): a slow-motion close-up before the flight, letterboxed, “INSTANT REPLAY” with a blinking red dot, tag “GREEN!” or “PERFECT!”, “SPACE / CLICK TO SKIP”.
  • Whiff: an “ooh” from the crowd. Every swing: a whoosh.

In flight and after

The flight is the Hit Show: the TV flight camera, the glowing tracer (white, sky, yellow, orange, red, purple as it goes further), the live FT counter with ticks, shouts (DEEP!, WAY BACK!…), GONE!, chips, then the HOME RUN! score stack or a FOUL / OUT / OFF THE WALL stamp.

Crowd at the landing: home run = bell + big cheer (huge from 450 ft) + organ charge; foul = “ooh”; out in play = groan. Count: a wood block on every strike (soft) and out (loud); a strikeout adds a groan.

Play card (right, under the count; stays until the next pitch is released):

  • Headline in colour: HOME RUN! (gold); OFF THE WALL - OUT, GROUND OUT, FLY BALL - OUT, STRUCK OUT!, STRUCK OUT LOOKING (red); FOUL BALL, SWING AND A MISS, STRIKE LOOKING, BALL, BALL FOUR - COUNT RESETS (white).
  • Pitch line: name, MPH, IN THE ZONE or OUT OF THE ZONE.
  • Contact: four pills (grade in its colour, “n MPH”, “LAUNCH n°”, “n FT” orange on a home run) and “TIMING: EARLY / LATE / ON TIME” plus “AIMED: PULL + LIFT” if a direction was held.
  • Whiff: “SWUNG EARLY”, “SWUNG LATE” or “SWUNG ON TIME”. Take: “TAKEN”.

Feedback matrix

“Change” is what the feedback points the player to. No signal means the game does not say. Words used: quality is the hit’s 0-to-1 score from where on the bat it landed; spray is the hit’s direction (0 = straight to centre field).

OutcomeSeesHearsTextWhat it tells you to change
Whiff, earlyRing frozen white (if on); ball goneWhoosh, glove pop, oohSWING AND A MISS; SWUNG EARLYWait longer
Whiff, lateRing white (if on)Whoosh, glove pop, oohSWING AND A MISS; SWUNG LATESwing sooner
Whiff, on timeRing maybe yellow/greenWhoosh, glove pop, oohSWING AND A MISS; SWUNG ON TIMEYour timing was fine (within 25 ms) but the aim helper wasn’t on the ball. No signal which way
Foul (timing)Ball off a line, FOUL stamp, grey FTCrack, ooh, soft wood blockGrade popup; FOUL BALL; TIMING: EARLY / LATESwing later (EARLY) or sooner (LATE)
Foul (hooked)Ball curves over the lineas aboveFOUL BALL; TIMING may say ON TIMENo signal that the curve or A/D did it
WEAK (sour)Grey popup, low or very high ball, OUT stamp (or a FOUL if the timing was also way off)Crack (often soft), no ping, groanWEAK!; GROUND OUT or FLY BALL - OUT (or FOUL BALL)Get the ball to the middle of the aim helper. No signal tip or handle
GOODSky-blue popupCrack, ping only from quality 0.55GOOD!Closer to the sweet spot
GREATGreen popup, short hit stopCrack, pingGREAT!Slightly closer to the sweet spot
PERFECT (not GREEN)Yellow popup, hit stop; close-up if timing >= 0.6Crack, pingPERFECT!; TIMING may say ON TIMESwing a touch more exactly on time. A GREEN needs the hit to go almost dead centre (within 9 degrees), but the card already says ON TIME up to 18.75 degrees, so it can’t tell you which way
GREENBig green popup, flash, shake, longer hit stop, green trail, close-up, streak pillGreen crack, ping, cheerGREEN! / GREEN! xn; GREEN STREAK xn. The play card’s grade pill still says PERFECTKeep doing it
Home runHit show: GONE!, HOME RUN!, score stack, total flies to the scoreCounter ticks, chimes, riser, bell, cheer, coinsHOME RUN!; “n FT”; “+points”Nothing; distance and targets raise points
Big momentSlow motion at the wall, then the replay with tracer and tagsas home runINSTANT REPLAY; GREEN!, PERFECT!, SCOREBOARD!, BULLSEYE!, MONSTER SHOT!, WHAT A SHOT!Nothing
Take, ballBall passesGlove popBALL / BALL FOUR - COUNT RESETS; OUT OF THE ZONE; TAKENGood take
Take, strikeBall passes, strike lightGlove pop, wood blockSTRIKE LOOKING; IN THE ZONE; TAKENSwing at pitches in the zone
StrikeoutOut ball turns redWood block + groanSTRUCK OUT! / STRUCK OUT LOOKINGas the last strike
Out in playOUT or OFF THE WALL stamp, grey FT sinkingGroan, wood blockGROUND OUT / FLY BALL - OUT / OFF THE WALL - OUT; LAUNCH n°More distance. No signal what was wrong (zone, launch or power)

Numbers

WhatValueWhere to tune
Grade popup1.3 s; pop 1.8x (GREEN 2.4x) over 0.15 sHudView.GradeSeconds, DrawGrade
Big message (Now facing, INNING n CLEARED!…)1.8 s; hidden while a home run’s counter is upHudView.MessageSeconds
Green flash0.25 sHudView.GreenFlashSeconds
Green shake0.22 s, 0.035 m, 38 HzGreenFeedback
Hit stop0.09 s (quality >= 0.7), 0.16 s (GREEN), time scale 0.05AtBatController, SwingResolver.HitStopQuality
Cracksoft < 78 mph, medium < 96, hard >= 96, green crack on GREENSoundBank.CrackFor
Pingquality >= 0.55, 0.03 s after the crackGameAudio.SolidContactQuality
Huge cheerhome run of 450 ft or moreGameAudio.OnHitLanded
Timing labelEarly / Late beyond 0.025 s (contact: spray beyond 18.75 degrees)SwingResult.TimingLabel
Ring freeze after a swing0.35 sTimingIndicator.FlashSeconds
Aim helper sizebarrel half-height = 0.35 x reach, 0.04 to 0.1 mAimBat
Held-aim pill lightsbeyond 0.3HudView.AimRow

In the code

FileWhat it does
Assets/_Project/Scripts/UI/HudView.csGrade popup, green flash, streak pill, play card, hit aim box, key hints, replay letterbox
Assets/_Project/Scripts/Batting/AimBat.csThe aim helper
Assets/_Project/Scripts/UI/TimingIndicator.csThe timing ring
Assets/_Project/Scripts/UI/GreenFeedback.csGREEN camera shake
Assets/_Project/Scripts/UI/HitCounterView.csCounter, stamps, shouts, chips (see Hit Show)
Assets/_Project/Scripts/Audio/GameAudio.cs, SoundBank.csEvery sound above, from GameEvents
Assets/_Project/Scripts/Batting/AtBatController.csHeadlines (ReportPlay), hit stop, trail colour

Gotchas

  • Settings > REPLAYS only stops the big-moment replay after the play. The contact close-up before the flight (GREEN, or a well-timed PERFECT) still plays.
  • During a big replay’s contact close-up the tag reads “PERFECT!” for any non-green swing, even a GOOD one that earned the replay by distance or a target. The tracer part then shows the real reason.
  • The crack follows exit velocity, not the grade, so a Power build’s WEAK hit can still sound hard.
  • A whiff’s result appears 0.3 s after the ball passes the plate (the swing window stays open until then).
  • Feedback for a co-op teammate’s swing comes from their result; the hit aim box and key hints are hidden while spectating.

Gaps and ideas

Analysis, not built

Outcomes where the player gets no or unclear feedback on why it went bad, and the code that would have to change.

  1. Tip or handle is never said. The zone decides the grade, but nothing says which way you missed the sweet spot. SwingResult.contactOffset already has the sign (+ = toward the tip). Change: HudView.DrawPlaySummary (a “OFF THE END” / “JAMMED” line) or HudView.OnSwing.
  2. “ON TIME” is looser than GREEN. The label flips at 18.75 degrees of spray (SwingResult.TimingLabel, 0.025 s); GREEN needs 9 (SwingResolver.GreenTiming). A PERFECT that missed GREEN on timing can read “TIMING: ON TIME”. Change: a finer label or a timing meter from SwingResult.timingQuality.
  3. A whiff with good timing gets no aim hint. “SWUNG ON TIME” when the bat passed over, under, in front of or behind the ball. SwingResolver.Whiff keeps only a time offset. Change: BatCollision.Sweep would need to return the closest miss, and HudView to show it (“OVER IT”, “UNDER IT”).
  4. Too high or too low on the ball is never shown. SwingResolver.Classify computes under (up to 6 degrees of launch) but SwingResult does not keep it. Change: store it in SwingResult and show it on the card.
  5. Launch has no target. The card shows “LAUNCH 52°” but not that a sour hit rolls grounders or pop-ups, or what a good launch is. Change: HudView.DrawPlaySummary (a zone word or colour on the launch pill).
  6. The zones are invisible. Earlier aim-helper versions lit the nice and perfect zones; they were removed (commit d1502fc). Contact upgrades widen the zones with no visible change. Change: AimBat (zone marks scaled by HitTables x Contact).
  7. A hooked foul is not explained. A ball can start fair and curve foul because of the held A/D or the batter’s curve. Change: HitPhysics would have to flag it, HudView to say it.
  8. W/S cost is silent. Holding W lowers power by 6%; only “AIMED: LIFT” shows. Change: the play card.
  9. No timing cue by default. The timing ring is off by default (GameSettings.showTimingRing). Without it the only timing feedback is after the swing.
  10. The play card hides a GREEN. Its grade pill shows swing.Grade, which says PERFECT even on a GREEN; only the popup and the streak pill say GREEN. Change: HudView.DrawPlaySummary.