2 Minute Drill
An NFL “2-minute drill” simulator: you’re down 4 with 2:00 left at your own 25. You draft a 5-man offense (QB, RB, WR1, WR2, TE) from historical players, then face a legendary defense (e.g., 2008 Steelers “Steel Curtain II”) and try to reach the end zone before time runs out.
Inspiration. Late-game football decisions come down to probabilities, and I wanted to make that feeling playable while grounding each play in real career stats.
How it works.
Draft room: Each slot offers 3 randomly chosen historical candidates, shown with career stats (completion %, YPA, catch %, rushing YPC). Simulation engine: Each play draws yardage from a Gaussian distribution via the Box-Muller transform. The mean comes from the player’s career average scaled by the defense’s run or pass rating, so stronger defenses shrink the expected gain. Clock and situation logic: Incomplete passes stop the clock (5s), completions and runs take 12–28s, and under 30 seconds the QB takes deeper shots. With 5 seconds left, the QB attempts a Hail Mary. Commentary: Each play gets a play-by-play description, with an optional Gemini-generated announcer line if an API key is set.
Built with. Next.js 14 (App Router), React 18, TypeScript, Tailwind CSS, Framer Motion, a Next.js API route for draft pools and play simulation, and a Python/Node data pipeline that processes nflverse CSVs into a local JSON file of about 3,800 players (2000–2023).
Challenges. Keeping the odds feeling fair, so that a 40% comp player and a 70% comp player both produce plausible drives. Also, making the data pipeline output light enough to ship without a database.
Accomplishments. A complete, playable draft-to-drive loop deployed on Vercel, with an interactive field, clock, and down-and-distance tracking.
What I learned. Modeling sports outcomes with simple distributions is fast to build, but tuning the parameters is where most of the work goes.
Log in or sign up for Devpost to join the conversation.