Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
2D simple car game using VDrift physics engine
09-01-2013, 01:45 PM, (This post was last modified: 09-01-2013, 01:47 PM by mike_p.)
2D simple car game using VDrift physics engine
Hi guys,

I hope I will not offend anyone here, but I have a question that is not about Vdrift itself, but somehow related it. I am working on a personal open source project trying to create a small 2D car game (viewed from lateral). I want the car to act like a real car: processing the gas, brake and clutch inputs from the user, change gears up/down, maintain speed due to inertia of the car even though throttle is no longer applied, slowing down when going over hills or speeding up when going over valleys, slowing down due to friction and air resistance. The output that I need is the wheel speed so I can move the car. I make some assumptions that simplify a lot the physics engine: the wheel cannot slip, there is no differential (as there is only one driven wheel, not 2), there is no suspension, there is no tire and rim, just a wheel with the needed properties (radius, mass, inertia). The program is written in C and developped using Visual C++. I have managed to port the code put in the engine, clutch, brake, transmission and driveshaft files because this is code working with scalars and it’s easy to understand. Can someone help me with porting the code in car and cardynamics ? It needs to be cleared from all the parts that I don’t need and I suppose that all the vectors should be transformed into scalars.

Thank you for any thought you might want to share with me,

Forum Jump:

Users browsing this thread: 1 Guest(s)