# 2D Side View Vehicle Physics

This topic is 3953 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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?

##### Share on other sites
Umm, I have code for that, but its in Lisp, and some assembly required.

##### Share on other sites
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.

##### Share on other sites
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?

##### Share on other sites
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

##### Share on other sites
Thanks a lot for your help. :)

##### Share on other sites
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

##### Share on other sites
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).

1. 1
2. 2
Rutin
16
3. 3
4. 4
5. 5

• 26
• 11
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633708
• Total Posts
3013468
×