Programming Vehicles in Games
9 months ago
- #simulation
- #game-development
- #vehicle-physics
- The article discusses the fundamental principles of programming vehicles in games, emphasizing the importance of creating the right experience rather than simulating real physics.
- Games manipulate reality to deliver specific experiences, with racing games offering a wide spectrum from arcade (e.g., Mario Kart) to simulators (e.g., iRacing).
- The key question for developers is not about simulating real physics but about conveying the desired driving experience.
- The author shares their journey from faking vehicle physics in AV Racer to understanding real vehicle dynamics for more realistic simulations.
- A car in a game can be broken down into three main components: the engine (including gearbox), the tires, and the chassis.
- The engine is a torque calculator that responds to player inputs, with torque varying based on RPM and gear ratios.
- Tires are critical as they are the only contact point with the road, generating all forces (longitudinal and lateral) through deformation and friction.
- Slip ratio and slip angle are key concepts for understanding tire behavior during acceleration, braking, and cornering.
- The chassis is a rigid body that responds to forces from tires and external influences, affecting weight transfer and grip.
- The article highlights the complexity of simulating combined slip, where longitudinal and lateral forces interact non-linearly.
- Advanced topics like suspension geometry, aerodynamics, and tire wear are mentioned as areas for further exploration.
- Recommended readings include 'Race Car Vehicle Dynamics' by Milliken & Milliken and 'Mechanics of Pneumatic Tires' by S.K. Clark.