Gaming

At the junction of realism and fun: how does the movement model of the car in Uncharted 4

Advertisement

As well as the difficulties that developers have encountered while programming the physics of an SUV.

In Uncharted 4 for the first time in the series, the opportunity to drive an SUV. In Naughty Dog they wanted to correctly fit the new mechanics into the game – so that the movement on transport worked realistically, but not so much that the player would lose the pleasure of the gameplay when difficulties arise.

Naughty Dog programmer Eduard Pereira at the GDC 2017 conference told how the studio coped with this task. We chose the most important of the speech.

When the developers began to design the mechanics of movement on the car, they fixed for themselves the basic principles that they wanted to adhere to:

  • riding brings pleasure to most of the players;
  • there is an element of realism to make the player feel “down to earth”;
  • Driving mechanics work correctly regardless of conditions – be it a hard surface or dirt.

In Naughty Dog they determined what tasks they needed to solve in order to recreate the correct simulation. First, the chassis of the machine must correctly recognize the collision with other objects and react appropriately to them. Secondly, the developer needed to understand how to recreate the behavior of the motor. Thirdly, the motor must work properly in conjunction with the chassis so that the right grip is calculated for the wheels.

First, the developers have prescribed the behavior of the suspension – its schematic representation is shown below. The yellow circle is the point of contact from which information about the surface is read. The straight line shows how much the suspension springs can compress to vertically move the wheel.

First, the developers have prescribed the behavior of the suspension – its schematic representation is shown below. The yellow circle is the point of contact from which information about the surface is read. The straight line shows how much the suspension springs can compress to vertically move the wheel.

However, due to this approach, the machine could not read the surface correctly and quickly enough – sometimes the wheels simply stuck in obstacles.

Therefore, the developers have slightly revised this system. Now the whole wheel reacted to the changes along the circumference. At once several points on the wheel read the surface, which made it possible to achieve the desired behavior of the suspension and the correct collision. So that the wheel does not tremble when several unstable objects (for example, boards) are located under it at once, the number of points of contact is limited to three.

But at the same time there was a problem – when the car ran into obstacles, it lost almost all its speed. This was due to the fact that not all points of contact of the wheel were perpendicular to the suspension.

To avoid this, the developers “tricked” the physics engine, making it so that all the obstacles of the wheels were read as perpendicular to themselves. In this case, Naughty Dog had to get away from realism in order to save driving pleasure

In some ways, the movement of the car had to be restricted. So that the car could not drive into the walls (before it began to fall, it continued to cling to the wheels), the designers restricted the angle of its movement

Advertisement

No limit 

With restriction

The same had to be done with the forces that continued to act on the car in the air. To prevent the machine from turning over when falling from a slope, the developers had to add an additional force vector that did not allow the vehicle to fall onto the roof.


Without vector and with vector

Next was the task to correctly display the behavior of the motor and torque. In order for the control to remain relatively realistic and at the same time responsive, Naughty Dog recreated the principle of the differential – a mechanism that transmits the power of rotation to the wheels. Each wheel moves independently – for example, if the left one slows down or stops, then the right one will continue to spin with independent power from the left.

The distribution of torque on the wheels of the engines

The last question concerned the surfaces on which the SUV passes in the game. Depending on the given friction force, it was determined how strong the wheel grip will be and how often they will slip.

The highest traction (with the exception of roads) was in grass plots. Slightly lower – on surfaces with dirt. In the puddles and water clutch was practically absent. It was calculated as the force of friction of the surface on which the car goes, and the force of friction of the wheels themselves.

Forces affecting the grip. On the left is the perpendicular force emanating from the surface when it comes into contact with the wheel. The right shows the different coefficients of friction of the wheel and the surface

Wheel rotation force interacts with friction force

The friction force, in turn, was divided into front and side forces. The first is calculated by dividing the torque by the radius of the wheel. In the lateral force, the partial lateral and front speeds are multiplied by the perpendicular force from the surface.

Lateral force determines how much the car will slip

From this it follows that the total friction force is calculated by the root of the sum of the squares of the lateral and front forces.

However, in order for the car to enter a controlled skid, Naughty Dog again had to act to the detriment of realism. When a player presses the brake, the friction force at the rear wheels drops dramatically – which makes it easy to “drift” on areas with good resistance (for example, on asphalt).

The developers have recreated a fairly realistic model of the car’s behavior. However, many elements of the simulation had to be abandoned so that the player continued to enjoy driving. Still, Uncharted 4 is an action adventure, not an SUV simulator.

Advertisement
Tags

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button
Close
Close