I woke up this morning with thoughts of racing SCGT in my head - please
read on ;-) Then I started to think about how I domintate the AI in the
wet :-( This turned me to thinking about how to program a better AI.
As we all know, no current AI comes close to the thrill of racing real
humans so I started thinking about how to program my own object oriented
driving/racing simulation using C++.
I know I can't create a super visual and physics model by myself, but
know how to organize projects to allow for others to fill in the gaps
(like Linux :) For example, I would not start with the graphics. I
have a BSP display program that would get the job done (from an arcade
view) but someone out there could create a better display routine than
me. Someone wants OpenGL.. well program it :) I would build a simple
physics model .. like a go-kart and use simplistic coding for the
objects but allow for the ultimate F1 cars to be simulated as the
objects got more complex.
1. Air
Properties: Temperature, Density
2. Throttle
Properites: Position
3. Fuel
Properties: Octane (ability to make HP), How full the tank is
4. Chassis
Properties: Weight. Areodynamics would affect weight too.
5. Engine
Inputs: Fuel.Octane, Air.Temperature, Throttle.Position, Chassis.Weight
Outputs: RPMs, Fuel consumption to Fuel object
Properties: RPMs returned through the output shaft based on the
characteristics of the engine. For my simple model I could use an
electric engine which can provide 100% HP from a standstill.
6. Transmission
Inputs: Engine.RPM
Output: RPM
Properties: Using gears the input RPM will be converted to some output
RPM. For my simple model, only 1 gear will be used.
7. RearDifferential
Inputs: Transmission.RPM, RearLeftWheel.Grip, RearRightWheel.Grip
Output: RearLeftAxle.RPM, RearRightAxle.RPM
Properties: Converts the input RPMs to appropriate percentage of Left
and Right Axle RPMs. My simple model will have a locked differential
and only reduce the output RPMs like a gear.
8. FrontLeftTire
Input: FrontLeftSuspension.Camber, FrontLeftSuspension.ToeIn,
Chassis.FrontLeftWeight, Road.Angle, Road.Temp, Road.Friction,
Road.SurfaceType, Road.SurfaceDepth
Output: Traction
Properties: The tire will produce a percentage of perfect traction to
the physics engine. The road surface could be wet, but with a depth of
5mm to represent a puddle. If you have slicks on, you will hydro-plane.
9. ... more more more
With the interaction between the objects defined (inputs and outputs), I
can skip some sections to allow for future growth. For example, a
go-kart has no suspension, nor differential so those can be done later.
This will allow for unlimited modeling of cars, trucks, motorbikes?
I would create a skidpad to test the physics, but with editors for roads
and cars. You will see more than the 155 new cars like SCGT has or
10-100 tracks that GP2 has.
So am I insane for thinking about this? Hehe.
Jason.
--
Jason Monds "Insert Witty Remark Here" theCLAPPER in Kali
http://www.racesimcentral.net/; - My combined gas/brake
setups
http://www.racesimcentral.net/
(Remove 'no spork' when replying)