SimRacingGame: Learning Vehicle Physics by Building a Highway That Never Ends
A racing game starts falling apart when motion feels wrong. Steering looks fine until traction breaks. Drifting feels fun until feedback lags. Procedural roads feel clever until the curves stop feeling drivable. That tension made this project interesting.
This started as a learning project around driving physics, but it became equally about procedural generation and feedback systems. I wanted a lightweight highway driving game where the road kept unfolding and the car felt responsive enough to push.
The Road Was Its Own Problem
The procedural highway generator was one of the first systems that made the project feel bigger than a driving prototype. Generating endless roads is not just spawning geometry. It is making curves readable, smooth, and believable at speed.
Catmull Rom splines were a big part of that. They let me generate highways that felt less rigid than stitched road pieces. The road was not decoration. It shaped how every other system behaved, especially traffic and vehicle handling.
- Procedural spline highways with tunable turn and segment behavior
- AI traffic following generated lane paths across the spline
- Dual vehicle controllers exploring different handling models
I liked having both the standard controller and the custom drifting focused one. Comparing them taught me more than choosing one early.
Physics Was Mostly About Feedback
The interesting part of the car controller was not acceleration. It was how slip states drove effects. Tire smoke, skid marks, wheel friction changes, and screech audio all depended on physics conditions feeling coherent.
That coupling mattered. A drift only feels convincing when visuals, sound, and handling react together. I spent more time thinking about those interactions than raw top speed.
Manipulating wheel friction for drifting was one of those details that made Unity physics feel less black box and more understandable.
What Did Not Really Work Yet
The project was intentionally incomplete in places. Traffic AI followed paths but did not behave intelligently around the player. There were no objectives, progression systems, or deeper gameplay loops.
That mattered. It was more driving sandbox than full game.
I would also redesign some assumptions in the car scripts. Hardcoded wheel ordering and mixed controller patterns made parts of the code more fragile than they needed to be. Some naming and architecture reflected learning in progress.
What I Learned Building It
One thing I realized is vehicle feel is systems design. Steering code alone does not create handling. Road geometry, suspension tuning, friction curves, camera feel, particles, and sound all contribute.
I also learned procedural generation is constrained by gameplay. A mathematically smooth road can still produce bad driving.
Having parameters exposed in the inspector helped a lot. Tuning by changing code would have slowed everything down. Tuning by driving, adjusting, and driving again taught more.
Why This Project Mattered
This was one of the first projects where I felt the feedback loop between code and simulation. Change a friction value and the whole experience changes.
Good driving physics is thousands of small agreements.