Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

holy_moly

driving physics

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi, i need some info about programming bike/car-physics (like shifting gears,rpm''s,brakes and so on...). any help would be nice..

Share this post


Link to post
Share on other sites
Advertisement
Physics hey.... hmmm. I haven''t done much with cars, so correct me if I''m wrong

Start of with the basics. Get your velocity / acceleration working properly, using the 5 equations of Straight Line Motion (find a good physics text from some help here).

Ok. Let''s assume that your car goes forward by pressing the up arrow. Check to see whether it is pressed down, then you have two choices. You could either add a certain value to your speed every frame, or multiply the current speed with by another number (eg speed x 1.04). I''m not sure which is best, and I don''t know about the increments, but this should serve as a rough guide. I personally think a multiplyer might be a good idea, as it would be much easier to simply change the multiplier when changing gears. I dunno - just a thought! Brakeing would probably be the same as acceleration... only slower.

I have no idea on RPM, perhaps you could steal that data from car makers! In fact, this would be a good idea - nice and realistic! You could also grab the data for gear shifts as well...

Sorry I can''t be more specific.

Best of Luck

Simon Wilson
XEOS Digital Development

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Well
If the only problem dealing with physics were the acceleration, there wouldn''t be much of a problem since Breaking and Accelerating is The same(speed = miles/hour)(acceleration = miles/hour*hour) the tricky part is when you need friction between the car and the road. You should check for each tyre seperately if you want good physics, there is also a question of suspension and a lot more, the question is - how accurate physics is needed?
Well - if that is to complicated, probably is, you could use direction and speed. When you change the direction more than allowed(some constant number) compared to the current speed, the car skid (turns even more but the direction isn''t changed?).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster

What you need is The Physics of Racing:

http://members.home.net/rck/phor/

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!