SERIES: Driving Simulator Workshop (Mirror)
In 2020-2021, I wrote a tutorial explaining the first steps to assemble a simulator like GDSim yourself in Godot, sharing fundamental concepts and sources that helped me. Here I will collect a mirror of those posts.
Stay tuned, because new devlog posts will follow! ๐บ๐ฎ
This tutorial series is reposted as-is. There are no errors I'm aware of, but it would be different if I wrote it all again. I'm copying it here for preservation and because it makes sense. ๐
Posts:
I. Suspending a RigidBody
II. Suspending a RigidBody, Part 2
III. Rays Go Round - Lateral Force
IV. Rays Go Round - Adding Things Up
V. Start Your Engines
VI. Brushing Up and Misc. Details
General Formulas:
# Hooke's Law for springs spring_force = stiffness * compression
# Damping factor added to Hooke's law spring_force += damping * (compression - previous_compression) / delta
# Slip ratio slip_ratio = (angular_velocity * radius - velocity) / velocity_magnitude
# Pacejka "magic" tire formula Force = Load * Peak * sin(Shape * arctan(Stiffness * Slip - Curvature * (Stiffness * Slip - arctan(Stiffness * Slip))))
# Rolling resistance roll_resist = 0.005 + (1 / pressure) * (0.01 + 0.0095 * (velocity / 100)^2)
# Torque and the moment of inertia torque = moment_of_inertia * acceleration acceleration = Torque / moment_of_inertia = delta_velocity / delta_time delta_velocity = delta_time * torque / moment_of_inertia
# Moment of inertia for a solid disc moment_of_inertia = 0.5 * mass * radius^2
Sources:
How to Build a Racing Game (Jake Gordon) -- Not super relevant here, but offered if you'd like to start where I started. ๐
Car Physics for Games (Marco Monster) -- A seminal source. Excellent place to start...so long as it remains online. (Check out the date!)
Space Dust Racing UE4 Arcade Vehicle Physics Tour (Space Dust Studios) -- Video overview of the raycast suspension concept.
Pacejka '94 Parameters Explained (Edy) -- Deep dive into Pacejka parameters, with a collection of more- and less-helpful example values.
Tyre Dynamics (Racecar Engineering) -- Overview of fundamental concepts in tires.
Unity Drift Simulator Tutorial (NoCakeNoCode) -- A comprehensive example in Unity's programming language, which inspired my drivetrain simulation
Combined Slip Tire Models (Imam) -- MATLAB scripts for both tire models discussed here [original link broken; here's an alternative]
Get GDSim
GDSim
Driving simulator prototype made with Godot
Status | Prototype |
Author | Wolfe |
Genre | Simulation, Racing |
Tags | 3D, Driving, gamepad, Local multiplayer, Physics |
Languages | English |
Accessibility | Configurable controls |
More posts
- 10,000 Downloads! Thank you so much!Apr 14, 2024
- Costly 3D Mistakes to Avoid (Postmortem)Mar 09, 2024
- Tires at Rest - A Deceptive SolutionFeb 07, 2024
- Workshop VI - Brushing Up and Misc. Details (Mirror)Feb 06, 2024
- Workshop V - Start Your Engines (Mirror)Feb 06, 2024
- Workshop IV - Rays Go Round - Adding Things Up (Mirror)Feb 06, 2024
- Workshop III - Rays Go Round - Lateral Force (Mirror)Feb 06, 2024
- Workshop II - Suspending a RigidBody, Part 2 (Mirror)Feb 06, 2024
- Workshop I - Suspending a RigidBody (Mirror)Feb 06, 2024
Leave a comment
Log in with itch.io to leave a comment.