I just finished car physics and AI code.
Of course there are lots of bug killing and tuning to do but all heavy lifting is done. Now it's time to start doing some content. I'm planning to do 3 cars and 3 tracks.
Visually the game still uses same ugly programmer graphics.
This is car description file for my car physics
[Visual]
MeshName = car.mesh
WheelName = Wheel1.mesh
[Dimensions]
Mass = 1200
CoG = 0 0.2 0.0
Inertia = 1500 1500 1000
FrontTrack = 1.6
RearTrack = 1.6
Wheelbase = 2.6
[FrontSuspension]
# N/m/s
BumbDamping = 2000
ReboundDamping = 2000
# N/m
Wheelrate = 24000
BumpStop = 0.2
# N/m
AntiRollBar = 20000
Independent = true
AntiRollGeom = 0.2
MaxTravel = 0.5
Mass = 20
ToeIn = 1
Camber = -1
MaxSteering = 40
Ackermann = 5
[RearSuspension]
# N/m/s
BumbDamping = 2000
ReboundDamping = 2000
# N/m
Wheelrate = 24000
BumpStop = 0.1
# N/m
AntiRollBar = 20000
Independent = true
AntiRollGeom = 0.2
MaxTravel = 0.5
Mass = 20
ToeIn = 0
Camber = -1
[FrontTyres]
MinRestFriction = 0.1
MinSlideFriction = 0.7
MinSlideVelo = 20
MaxRestFriction = 1.5
MaxSlideFriction = 1.3
MaxSlideVelo = 5
SoftResistance = 0.005
HardResistance = 0.001
SoftGripGain = 0.3
HalfLoad = 8000
Damping = 0.03
Radius = 0.3
VerticalStiffness = 200000
LatStiffness = 50000
LongStiffness = 50000
# slipRatio/kN
CorneringSlip = 0.02
DriveSlip = 0.02
[RearTyres]
MinRestFriction = 0.1
MinSlideFriction = 0.7
MinSlideVelo = 20
MaxRestFriction = 1.5
MaxSlideFriction = 1.3
MaxSlideVelo = 5
SoftResistance = 0.005
HardResistance = 0.001
SoftGripGain = 0.3
HalfLoad = 9000
#Stiffness = 100
Damping = 0.03
Radius = 0.3
VerticalStiffness = 200000
LatStiffness = 50000
LongStiffness = 50000
# slipRatio/kN
CorneringSlip = 0.02
DriveSlip = 0.02
[Engine]
#RPM
Revs = 8000
#Nm
LowTorque = 100
HighTorque = 600
#Nm at Revs
Drag = 300
#kg*m2
Inertia = 0.1
[Brakes]
# per wheel N*m
Front = 800
Rear = 600
[Aerodynamics]
# N/(m/s)^2
Drag = 0.5
Downforce = 1
Balance = -0.7
[DriveTrain]
FrontInertia = 3
RearInertia = 3
ForwardGears = 4
Gear_1 = 0.08
Gear_2 = 0.10
Gear_3 = 0.16
Gear_4 = 0.2
ClutchTorque = 500
ClutchStiffness = 800
ClutchDamping = 2
CenterLocked = false
# front/rear
TorqueSplit = 0.4
# Nm/rad/s
CenterVisco = 3
FrontLocked = false
# 0 = open 1 = max
FrontPower = 0.7
FrontCoast = 0.2
# Nm per wheel
FrontPreLoad = 0
RearLocked = false
RearPower = 0.7
RearCoast = 0.4
RearPreLoad = 300
[FrontHull]
VertexCount = 8
Vertex_0 = 0.9 0.1 1.6
Vertex_1 = 0.9 0.6 1.6
Vertex_2 = 0.5 0.3 2.3
Vertex_3 = 0.9 0.7 1.3
Vertex_4 = -0.9 0.1 1.6
Vertex_5 = -0.9 0.6 1.6
Vertex_6 = -0.5 0.3 2.3
Vertex_7 = -0.9 0.7 1.3
[MiddleHull]
VertexCount = 12
Vertex_0 = 0.8 0.1 1.1
Vertex_1 = 0.8 0.1 -1.1
Vertex_2 = 0.9 0.7 1.4
Vertex_3 = 0.9 0.9 -1.4
Vertex_4 = 0.5 1.1 0.2
Vertex_5 = 0.5 1.1 -0.8
Vertex_6 = -0.8 0.1 1.1
Vertex_7 = -0.8 0.1 -1.1
Vertex_8 = -0.9 0.7 1.4
Vertex_9 = -0.9 0.9 -1.4
Vertex_10 = -0.5 1.1 0.2
Vertex_11 = -0.5 1.1 -0.8
[RearHull]
VertexCount = 8
Vertex_0 = 0.8 0.2 -1.6
Vertex_1 = 0.6 0.3 -2.1
Vertex_2 = 0.9 0.9 -1.3
Vertex_3 = 0.7 0.9 1.9
Vertex_4 = -0.8 0.2 -1.6
Vertex_5 = -0.6 0.3 -2.1
Vertex_6 = -0.9 0.9 -1.3
Vertex_7 = -0.7 0.9 1.9