December 11, 2012

Car Physics Demo

The demo

Car Physics Prototype (Direct Link)

Controls for the demo:
W/S = Gas / Brake
Q/E = Downshift / Upshift
Shift = Clutch (Not implemented yet)
Spacebar = Handbrake
Mouse = Steering
F2/F3 = Rotating view / Fixed view
Escape = Exit
F11 = Toggle debug mode
(Following keys only work in debug mode)
F12 = Restart game
Numpad0 = Switch between manual / automatic
Numpad1/2/3 = FWD / RWD / AWD

 

My blabbering

 

I decided to start the devlopment of the game with car physics, mostly because I've never done it before.

It turned out pretty good! I tried to simulate as much as I could so that it feels more simulation than arcade. The result is an engine where you input the gear ratios, the engine strength and RPM info, tire radius, weight of the car and other parameters, and then you just watch how the car handles. It's really satisfying, even with the tedious bugs that remain (Mainly, automatic transmissions is finicky and manual cars can't stall). The "Max speed" you'll see in the top left is computed from tire radius, gear ratio (And transmission ratio) and engine maximum RPM. Since the engine blocks at a certain RPM, it can't push the car faster than this.

Included in the demo is a weird background. You'll see some kind of white squares with numbers on them. These numbers are actually the chunk coordinates which will later be used for world generation. For now, they don't generate far enough when going at 200km/h (But the car handling is so bad at that speed that you don't really want to try it if you love life).

The car you drive is an Audi R8 2012, AWD. I took the specs straight from the tech sheet of the car which I found on the internet. The other car you see is a Ferrari Italia 458, but it has the specs of a '97 Corvette RWD (Don't ask). It's incredible how much of a difference there is between the performance of these cars. For now, I didn't include a way of switching cars, so just trust me.

Bottom line: It's really fun to drive around, but there's something obviously missing. Environnement...

No comments:

Post a Comment