Racing Game Physics
T = X + (Y * S)
Where T is the stabilizing force on the car, S is the amount of slippage, and X and Y are two of the car's stats (probably measured in G's). This formula would be applied to each tire separately to account for the suspension.
NOTE: The thing that might not be obvious here is that the car doesn't slip at all as long as X isn't exceeded.
What do you think of this?
13
comments
|
Add Comment
|
From first principles I'd be thinking T is proportional to:
Tyre temperature, which would be a variable if you wanted to model it.
Road surface, again a variable if you wanted to model it.
Down-force (directly related to speed)
Basic coefficient of friction (modified by the above)
T plus engine output give you an acceleration, but you'd need to factor in output exceeding T such that wheels spin. Imagine traction control and it's easy, without that it's complicated...
I get the wheel-slip bit S, but am thinking you could avoid it as a necessary factor if the above are included correctly?
L
Priming some stats, let's say X is 0.8g and Y is 0.02g.
A car using my system is already up to high speed. Approaching a turn, there is no force applied through the wheels (just to make it simpler). As it starts to turn, it has less than 0.8g of force on it, so it keeps traction perfectly. If the force were held at 0.9g, then it would slip in the direction of the force at 5 mph (because the extra 0.1g = 0.02(Y) * 5(S)). If it somehow ended up going sideways at 100 mph, then 0.8g + (0.02g * 100) = 2.8g (!!!) or just deceleration of 61 mph per second (maybe Y should be a little lower...).
I hope that explains something!
http://www.gamedev.net/reference/programming/features/2dcarphys/
L
.
. For a homebrew game, taking tire temp, downforce, &c into account is overkill. A single (2-3 tops) factor should be good enough. Sounds to me as if accounting for each suspension is overkill - I'd treat all four the same. Guess it depends on one's programming skills and other resources.
![]() |













Vancouver Mini Maker Faire 2012
Rebuilding NordicTrack ski machine drive rollers
Looking for New Zealand-based Instructables authors for conference on August 27 in Wellington
Call to makers - Brighton Mini Maker Faire
Milk Crates - not as green as you think
TEDxBaghdad - Iraq - violence, dust storms and open sourced manufacturing
UK Mini Maker Faire - The Derby Silk Mill - New Poster to Share!







