c00ler Junior Member Posts: 8 From: St Petersburg Registered: 03-27-2006 |
Hi for my new online game (free of course) i need guy who will help me to finish car physic model just some equations anyone interested ? |
HanClinto Administrator Posts: 1828 From: Indiana Registered: 10-11-2004 |
How detailed of equations? 2D? 3D? Independent suspension? Offroad or track racing? Just wondering if you're looking for some simple approximations or a well-balanced physical model. Thanks! --clint |
steveth45 Member Posts: 536 From: Eugene, OR, USA Registered: 08-10-2005 |
If you want the car physics to be realistic, it's going to be pretty tall order. If that is the case, I'd use one of the handful of free physics engines available. Otherwise, you can implement simple acceleration: vector_3d velocity; // 3 dimensional velocity per millisecond //Here's some psuedo C++ code for each frame /* acceleration */ /* wind resistance : this can put a cap on how fast the car can move */ /* braking */ Those will help you get started, and they are only for driving in straight line, like a drag race. The maximum speed of vehicle while accelerating in a straight line will be roughly rate_of_acceleration / air_friction. If you have a vehicle with perfect traction, you can just rotate the velocity about the Y-axis to match the direction the vehicle is facing, while it is turning. Maybe, the faster the car is going, the less of a turning angle is available. You will also have to match the (imaginary) vector_3d functionality to whatever 3D vector is included in the math library you are using. Maybe tonight, I could come up with some theoretical equations for moving cars turning and skidding and such. Oh yeah, I probably made some mistakes, so use at your own risk. Now, I want to make a driving game... darn!
------------------ |
dartsman Member Posts: 484 From: Queensland, Australia Registered: 03-16-2006 |
I'd be interesting in finding out how this is done too. Car dynamics have puzzled me, though I do have some papers to go through that supposibly explain it. ------------------ Startup Christian Games Company Producing Mobile/PC Games/Tools |
c00ler Junior Member Posts: 8 From: St Petersburg Registered: 03-27-2006 |
thank you guys that answered me ! below link to matchcad file that i already have http://www.racingmanager.org/straight.m and our goal will edit edit it to get perfect car model this file already realized and work on the web. PM me if you want link to see. |
steveth45 Member Posts: 536 From: Eugene, OR, USA Registered: 08-10-2005 |
Holy cow, the equations in that link are sweet. Clutch slippage?... crazy. ------------------ |
c00ler Junior Member Posts: 8 From: St Petersburg Registered: 03-27-2006 |
So anyone feel the power to continue it ? or start from the scratch ? |
dartsman Member Posts: 484 From: Queensland, Australia Registered: 03-16-2006 |
nah, I'm scared to touch car physics atm :P Though I will definately look into it later. Please let us know how it goes, I'd like to know once you get it working and how you did... ------------------ Startup Christian Games Company Producing Mobile/PC Games/Tools [This message has been edited by dartsman (edited March 29, 2006).] |
c00ler Junior Member Posts: 8 From: St Petersburg Registered: 03-27-2006 |
this prototype already working i can give a link over PM but if you feel that its easy to start from scratch lets do it |
dartsman Member Posts: 484 From: Queensland, Australia Registered: 03-16-2006 |
yeah, i'd like to see the prototype, but I doubt I'd be any help with the coding side. Code looks very well commented, what language is it in? I might look into vehicle physics tonight (being that it is only 8:00pm here). ------------------ Startup Christian Games Company Producing Mobile/PC Games/Tools |
c00ler Junior Member Posts: 8 From: St Petersburg Registered: 03-27-2006 |
this is mathcad i will send you a link to workig prototype over email and in PM |
dartsman Member Posts: 484 From: Queensland, Australia Registered: 03-16-2006 |
Wow!!! Like that was crazy, I was actually expecting it more of a game :P haha, boy did that show me... I was like... whats happening?? Then scrolled down to see the tables... That is some brillant work there. I am for sure I wouldn't be able to help. That is well above my head. I'm kinda more into trying to get car dynamics working in a 2d/3d environment. But wow, thats like some serious output there. Good work, I wish I could help, but not only is my car engine knowledge lacking emensly, I'd be afraid to touch those equations. Do let me know how it goes though... ------------------ Startup Christian Games Company Producing Mobile/PC Games/Tools |
c00ler Junior Member Posts: 8 From: St Petersburg Registered: 03-27-2006 |
hi dartsman thank you for checking it. maybe anyone other can help ? |
CapnStank Member Posts: 214 From: Sask, Canada Registered: 12-16-2004 |
Do you guys want real physics equations? I could run to my physics notes to get some stuff on friction and forces etc. if you're interested. ------------------ |
c00ler Junior Member Posts: 8 From: St Petersburg Registered: 03-27-2006 |
Yes CapnStank i want real equations and it will be very kind if you allow me to use your equations |