2
\$\begingroup\$

How to model the physics of a car in a racing game?

In real life, vehicle movement is inherited from the wheels. But after reading a few articles on the subject (a lot of which are 10 years old), I realize that the 'real world' physics is in fact often faked with various equations and constants.

I want to create custom driving model to learn about it mostly, but I don't want to start wrong so that's why I am here.

\$\endgroup\$
1
  • \$\begingroup\$ I recommend taking a look at OpenNFS it's a Monogame remakeof the original Need for Speed. It has a simple, yet realistic looking car model that should get you started. \$\endgroup\$
    – Felsir
    Jul 15, 2016 at 14:40

2 Answers 2

3
\$\begingroup\$

Methods of creating vehicle physics changes dramatically from game to game. Often, as you have suggested, they focus on the body of the car and leaving the wheels as visual. The way I suggest going about this is using this system as a prototype, play around with what it can do and find the limitations, such as wheels clipping through uneven planes. This brings us to a second model, where wheels are the driving force. In this model you need to pay attention to a few factors:

_Where wheels are attached to the car body (since the body will move and control the movement of the wheel) _Traction between the wheel and surface _and finally the suspension

These are all key factors in determining the movement of the body and the wheels as well as their positions relative to each other. Good luck with the project, a complex system such as a car, is often difficult to replicate on a computer with any degree of realism or accuracy. So definitely start with the first model, since it is much simpler and can highlight key problems you may run into later.

\$\endgroup\$
0
\$\begingroup\$

The way you'll do it really depends on the kind of game you want to make.

If you want to achieve a realistic behaviour, you'll have to start by modeling nearly the whole car, with a decent physics engine.

If you want to achieve a more casual feel (games like MarioKart), you'll have to simplify a lot of things.

In any case, you'll have to fake some things, because real-time real-life physics simulation for a car game is not needed. The game has to feel right, not be right. You'll have to fake things more in a casual game than in a realistic game.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .