# here comes the kicker kind .......... project status ........ paused since 2026-08-19 · Unity port done, next steps not started checked ....... 2026-10-20 stack ......... javascript · three.js · c# / unity · game design source ........ private repo page .......... https://brodymontag.com/projects/here-comes-the-kicker 3D kickball, first in the browser with three.js and no build step, then ported to Unity 6 in C#. Pitches roll and bounce, and throw power depends on how long you hold. here comes the kicker started as a browser game: three.js, plain script files, no bundler. The work went into feel. Pitches roll, skip and bounce, throws get the power that you hold, and 80s-style callouts replace box scores. In August 2026 I ported it to C# in Unity 6 in three days. The simulation runs at a fixed step with a seeded random generator, separate from the view. The port also has a camera that looks ahead of the ball. A crowd reacts to play, and the lobby is a press box above the field. The project is paused. Avatar progression exists only as design documents. The work after commit fce6a4b has no compile check yet. ## highlights - Browser version: three.js, no build step - Held-power throws, and pitches that roll, skip and bounce - Positional defense with four difficulty levels - Unity 6 port: a fixed-step sim with a seeded RNG - A camera that looks ahead, and a crowd that reacts - Avatar progression: designed, not built ## detail updated 2026-10-20 ### how it works figure 1 · four pitches, in fixed steps · real constants, side view Four pitch types travel from the mound to the plate. Each dot is one simulation step of 1/120 s. A roller stays down, a skipper skips three times, and a big hop takes one long hop. The game state is one object, and a fixed-step loop advances it at 120 steps a second. The loop adds the real frame time to an accumulator and runs only whole steps. Slow motion and hit-stop change the time that goes in, never the step. The random generator is mulberry32 with a stored seed, so a seed and the same inputs replay a game. The ball physics are integrated by hand, with no Unity physics. At release, the game solves each pitch so that it crosses the aimed point. The pitch rolls or skips on the ground, and one airborne leg carries it up to the aimed height. The view reads the state and reacts to the events that the simulation sends. figure 2 · one simulation, stepped by one call Input writes intent into GameSim. Frame time fills an accumulator, which steps GameSim in steps of 1/120 s. GameSim sends its state and its events to the view and the UI. ```mermaid flowchart TD A[keyboard and mouse] -->|intent| B[GameSim] C[frame time] --> D[accumulator] D -->|steps of 1/120 s| B B -->|state and events| E[view] B -->|state| F[UI] F -->|calls| B ``` the accumulator: slow motion changes the time in, never the step kicker-unity@4e5017f · Assets/Scripts/Sim/GameSim.cs:265-289 · not public ```csharp /// js tick(). slow motion scales how much time is ADDED to the accumulator, /// never the step size — changing the step would break every solve in the sim public void Advance(float frameDt) { if (frameDt > 0.05f) frameDt = 0.05f; if (frameDt < 0f) frameDt = 0f; // hit-stop: a crisp micro-freeze at impact. it counts down in real time // and nearly stalls the sim clock while it lasts, so the ball and players // hang for a beat — the view keeps rendering, so shake and particles run // on and the frozen frame reads as a punch the TimeScale slow-mo eases out if (S.HitStop > 0f) { S.HitStop = Mathf.Max(0f, S.HitStop - frameDt); frameDt *= 0.05f; } if (S.FovKick > 0f) S.FovKick = Mathf.Max(0f, S.FovKick - frameDt * 30f); S.TimeScale = SimMath.Damp(S.TimeScale, 1f, 0.03f, frameDt); _accum = Mathf.Min(_accum + frameDt * S.TimeScale, Tuning.SimDt * 8f); while (_accum >= Tuning.SimDt) { Step(Tuning.SimDt); _accum -= Tuning.SimDt; } ``` ### decisions decision: The simulation is plain C#, not MonoBehaviours (accepted, 2026-08-17) context: The browser game stepped one state object with a fixed-step loop. Rules spread across Update methods would run in an order that the inspector sets. decision: The simulation is plain classes, stepped by one call. A fielder has a position, not a Transform, and the view finds its mesh by the fielder's index. A test can run the game with no view. cost: Unity components and physics do not apply to the simulation. The view needs a bridge for each part. decision: Solve each pitch at release, and integrate the ball by hand (accepted, 2026-08-16) context: A pitch must cross the plate at the point that the pitcher aims at. A solver and a physics engine cannot both own the same path. decision: The ball has no Rigidbody. The solve uses the same discrete steps as the game, and it snaps the last bounce to a step boundary. Three gravities, one each for pitches, batted balls and jumps, are tuned for play. cost: The constants mean nothing outside this game. A Rigidbody on the ball breaks the strike-zone calls. the solve, against the discrete integrator kicker-unity@4e5017f · Assets/Scripts/Sim/Pitching.cs:53-66 · not public ```csharp // snap the last bounce to a tick boundary so the airborne leg starts // exactly when the solve says it does. Mathf.Floor(x+0.5) not // RoundToInt: js Math.round breaks .5 upward, RoundToInt breaks to even float rollTicks = (T - Mathf.Min(pitch.Type.HopT, T * 0.85f)) / Tuning.SimDt; int nRoll = Mathf.Max(1, (int)Mathf.Floor(rollTicks + 0.5f)); float tRoll = nRoll * Tuning.SimDt; float tLast = Mathf.Max(Tuning.SimDt, T - tRoll); // solve against the discrete integrator, not the continuous ideal: // stepping v then p accumulates an extra 0.5*acc*t*dt float k = T * T + T * Tuning.SimDt; float kl = tLast * tLast + tLast * Tuning.SimDt; float vx = (targetX - 0.5f * a * k) / T; float vyB = (targetY - Tuning.BallR + 0.5f * g * kl) / tLast; ``` ### results figure kind value Unity port, compile check measured 0 errors size of the port at that check measured 31 files, 5,640 lines time for the port measured 3 days callout lines in the browser build measured 114 in 26 pools CPU difficulty levels measured 4 method: compile: Unity 6000.5.8f1 in batch mode at commit 6530942, on 2026-08-17. Port time: commits from 2026-08-17 to 2026-08-19. Counts: the browser build at 110edb6, on 2026-08-17. · as of 2026-08-19 ### limits limits: - No automated test suite exists. Claude sessions drove the browser build and read its pixels, and I ran the port in the editor. - No compile check or play test of the work after commit fce6a4b is on record. - The Unity scene has no color pass yet. - All the art is procedural primitives. ### status and next status: - Done: the browser game (2026-08-17) and the Unity 6 port (2026-08-19). - Paused since 2026-08-19. Avatar progression exists only as design documents. - Next: a compile check and a play test of the last cycles, then the item data types from the roadmap. -- end of page · this page as text: https://brodymontag.com/machine/projects/here-comes-the-kicker · index: https://brodymontag.com/machine · summary: https://brodymontag.com/llms.txt