Wednesday, 29 July 2026devblog

"The ball is on rails." They were right.

Players said the ball felt like it was on rails while dribbling. It literally was. So I rebuilt it from scratch, then broke it, repeatedly. The honest answer tonight is "closer."

Day 40ONRAILS

Tonight was not fun.

Some players told me the ball felt like it was "on rails" while dribbling. They were right. It literally was. The old system switched physics off and wrote the ball's position in front of the player every single frame.

So I rebuilt it from scratch. Then I broke it, repeatedly:

  • A throw-in hit a player in the chest and flew out of the stadium.
  • Passes stuck to the passer and went nowhere.
  • The player outran the ball.
  • Then the ball ran away from the player.
  • Couldn't dribble in a circle at all.

It is better now. The ball is genuinely physics-driven, close control is assisted, and turns pick different animations based on how hard you cut.

Why the "realistic" approach failed

My first rebuild was the one that sounds right on paper: discrete kicks, one per stride, the ball rolling free between touches. Like actual football. It does not work. A kick is a straight line, so on a curved run the ball leaves on a tangent and you physically cannot dribble in a circle. And a fixed "ball leaves at 1.2 times your speed" cannot work either, because friction slows the ball while you do not. It is always either lost or overrun. There is no value that fixes both.

What actually worked

A velocity spring toward an anchor point ahead of your feet, driven by where you are steering rather than where you are already moving. It corrects sideways drift, holds curved runs, and the ball is still fully physical: it bounces, gets trapped on a pass, and a defender can nick it off you. It turns out "realistic" and "feels right" are different problems, and the big football games solved this decades ago with assistance I was too stubborn to start with.

The bit I'm still stuck on

The animation moves the foot faster than the ball can follow, so on inside-of-the-foot turns the ball trails the boot and only catches up when the animation ends. I have rewritten that one piece four times tonight. Current suspicion: I am tracking the ankle bone, but the ball actually meets the instep, which means the real fix is a proper contact socket on the boot, not more code. Tomorrow's problem.

This is the part of game development nobody posts about. One mechanic, an entire night, and the honest answer is "closer."

Shipped: physics-driven dribble · assisted close control · cut-strength turn selection