2D Side View Vehicle Physics

Started by
6 comments, last by jezham 16 years, 2 months ago
I have been searching for ages but cannot seem to find an article for 2D vehicle physics (like in this game: http://dirt-bike.freeonlinegames.com/ ). Can anyone share any links that might be helpful to me?
Advertisement
Umm, I have code for that, but its in Lisp, and some assembly required.

that looks to be a clone of Elastomania. If you like it, look for the original :)

As for the tech behind that kind of games, it's rigid bodies, basic constrains and springs. It's not straight forward, but if you start with Chris Hecker's articles, that will give you an idea.

Also, I have a similar sort of demo, but using a completely different system.

http://uk.geocities.com/olivier_rebellion/wh1.zip

It's using the particle + stiff constrains as explained by jakobsen in his chracter physics article.

Everything is better with Metal.

I used to play elasto mania all the time. :P

The thing I really need help on is how to get the wheels to deal with friction.

I have most other things under control really.

EDIT: I had a look at your demo. Would the best way to do the wheels be to do what you did for the car?
probably not.

I'd stick with rigid bodies, but friction is 'complicated'. :)


A simplistic model is explained here

http://www.gamedev.net/community/forums/topic.asp?topic_id=482505

but i would use pacejka's magic formula for more accurate and predictable results

http://www.racer.nl/reference/pacejka.htm

Everything is better with Metal.

Thanks a lot for your help. :)
Theres no need to use the Pacejka formula for a side on view car / bike physics.

The Pacejka formula calculates the forces on the tires given the current long and lat slip angles.

The lateral slip angle obviously isnt necessary and the long slip angle would just over complicate things.

Just use standard newtonian physics equations. Force, Acceleration, Velocity ect.

The term to seach for would be Constraint physics or VERLET Physics.

KJM

Yeah Elastomania was great fun in it's day, if you want more stuff to 'research' check out the "EXTREME SPORTS GAMES" section over at www.teagames.com (they're online Flash games, and quite addictive).

This topic is closed to new replies.

Advertisement