logoalt Hacker News

PatKerr • today at 10:17 PM • 0 replies • view on HN

What in particular would you like to know?

As I said in the summary article, the core is a "textbook" 2D rigid body simulation (the "Brick" layer), and the Car bit is mostly a matter of deciding what forces are applied to the tyres.

In short, the tires "like" to go back and forward, but resist going sideways (relative to the direction they are pointing in).

The forces which are applied at the tyres are roughly equivalent to friction, but not quite (friction is stranger than people think, and is not actually very velocity dependent). In some ways my tyre forces actually behave more like a form of "viscous drag" actually. I knew this was a bit dodgy at the time, and it was a sort of conscious "hack" that was chosen to produce "playable" behaviour as simply as I could.