rec.autos.simulators

My car sim project...

Jason Mond

My car sim project...

by Jason Mond » Mon, 24 Jan 2000 04:00:00

Hello everyone,

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)

Remco Moe

My car sim project...

by Remco Moe » Mon, 24 Jan 2000 04:00:00

Hi Jason,

Interesting stuff.


>Hello everyone,

>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 wouldn't bother with AI, but concentrate on online play....just MO.

I agree, graphics aren't important at first. However, when you study
the file format of the tracks (and cars) in GPL, you'll see they went
through a lot of trouble to optimize the tracks in favor of graphics
(read framerate). You also should consider the synchronisation between
the physics rate and the graphics. And, don't forget that  the
graphics are the most important feedback for the player.

Is a good idea to start learning, but I believe you should start with
a proper foundation. Physics don't change, you don't have to relearn
that piece of code, unlike graphics/sound/GUI/controller code.
You need a solid physics base, a nice graphics/sound engine, and tools
so others could make the tracks and cars. You could consider a series
designer, where you create the rules for the cars/tracks.

Then people could design their own car, according to the rules. They
should make a compromise between speed and reliability, and the
program should use this parameters (and driver behaviour) to determine
when there is a failure. You can even go so far that they need to
build their own engine. A simulation in a simulation....

<Snip Object & Properties>

Yes, those object and stuff make sense, but it is far from complete,
and the order seems random.

One problem when you start a project as ambitious as this, is that
there is no room for optimalisation. Calculating the contact path of a
tire on a road surface is something different compared to a tire <>
dirt surface. Computers aren't fast enough to build one generic
algoritme for it.

Heck, modelling modern F1 with the same standard as GPL would
possible be too much for the fastest computers available  today.
(Consumer computers, that is. A Cray might do it <g>)

Anyway, I am interested, and would like to be a part of it....

Of course you are, so am I <g>

Remco

Matthew V. Jessic

My car sim project...

by Matthew V. Jessic » Mon, 24 Jan 2000 04:00:00

There is an international crossplatform basic simulation of automated racing

available called RARS (Robot Auto Racing Simulator). (see below).

If you have access to a C++ compiler, you can put together
the low level AI routines an create an AI to compete.
It's fun to play with. The graphics included (at the time I looked at it)
were an overhead shot of fairly complex tracks showing the car
positions as the race progressed.

The following is a somewhat dated note from the

giving a basic description and URLs for more info.
A digest of the list goes out several times a month.

Subject:
        RARS Race results for 26-9
   Date:
        Sun, 26 Sep 1999 14:51:02 +0100
   From:

     To:

RARS Race Report
     & News About Upcoming Races
       September 26th, 1999

RARS is the Robot Auto Racing Simulation, a competition for
programmers and an on-going challenge for practicioners of Artificial
Intelligence and real-time adaptive optimal control.  It consists of
a simulation of the physics of cars racing on a track, a graphic
display of the race, and a separate control program (robot "driver")
for each car.  All RARS software and activities are free and open to
the public.  It runs on DOS, Windows, OS/2, UNIX, Linux, and several
other platforms.  For more information e-mail to

http://www.ebc.ee/~mremm/rars/rars.htm and
http://home.planetinternet.be/~pascutto/index.html


> Hello everyone,

> 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++.

--
Matthew V. Jessick         Motorsims

Vehicle Dynamics Engineer  (972)910-8866 Ext.125, Fax: (972)910-8216
Valter Hilde

My car sim project...

by Valter Hilde » Mon, 24 Jan 2000 04:00:00


> ... 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.
> ...

Well, I have been thinking of similar things myself, only I came to an
opposite conclusion. I feel that your physical model is too simple. I
have played a lot of Test Drive 5 lately, and the model *sucks*. It's so
simple that cars handle like shit. I think the physical model should be
far more elaborate, with tire flexibility, shock absorbers and spring
stiffness, weight ditribution and moments of inertia, center of gravity
positions, motor torque curve, etc...

Also, TD5 and other simplified games are so _unfair_. The AI must get a
chance to win, so what do they do? The police can stop you, but not the
AI. If the AI touches your car, you crash, if you touch the AI, you
crash... All cars handle exactly the same, only with different
acceleration.

My recipes for a good simulation:
1) An _exact_ physical model, as I described above. It would need far
less CPU power than the 3d landscaping.
2) Fair rules. The AI must respond exactly as you do. It must see
exactly what you can see. It must respond to the same rules. Police can
stop anyone, all cars have the stability dictated by their respective
physical models. A Shelby Cobra would handle better than a hemi 'Cuda,
of course, but you would know that when you chose your car.
3) Smarter AI. More reasoning power to the "driver". "He" must be able
to plan according to what he sees of the road. Lack of "brain" power by
the AI should never be compensated by cheating the rules against the
human.
4) Analog control, not keyboard. In TD5 you touch a button on the
keyboard and the steering goes fully to the direction you touched. The
joystick, despite being an analog device, handles exactly the same way
in TD5. What is needed is using the analog capacity of the joystick for
steering and throttle.

Kirk Hous

My car sim project...

by Kirk Hous » Mon, 24 Jan 2000 04:00:00

Maybe you could get a Java Linux Open GL project going.  I just read that
OGL is now fully supported in Linux so it would be easier to test the
graphics side of the project.  I suggest Java because it is much easier to
port (or so I hear) than C++ and I suggest Linux because I have a feeling
that by the time the project creates something interesting we will all be
using Linux anyway.  If I could program worth a damn I'd help :)


Jason Mond

My car sim project...

by Jason Mond » Tue, 25 Jan 2000 04:00:00

Hi Remco,


> I wouldn't bother with AI, but concentrate on online play....just MO.

I agree 100%  The AI thoughts just got me started :)  One thing about
online play and warping would be to have an AI that would drive like you
do to make up for the loss of packets.

The go-kart idea is a stepping stone (using the least number of
"working" objects) so I can feel like I accomplished something.  Once I
have a basic framework of how the objects communicate.  People who
really know suspensions should be able to fix my less than perfect
suspension-object algorithms.  I really don't know all the physics stuff
but will code for weight transfer communication and such.

I was thinking on a triangle driven graphics engine, you can make the
triangle as small/big as you want.  For example SODA had relatively
large triangles, in this graphics engine you could make then small to
produce.. bumps :)  I have a working test bed for this triangle engine,
but you can't get too close to objects or it clips incorrectly.

Sound.. You mean "vrooom vroom" spoken by me won't cut it?  Hehe.  This
is where someone with sound knowledge will be helpful.  Hopefully once
they see the package they will be glad to put sound in.

This is the easy part :)

Now that would be cool.  

You bet, I just spent 10 mins to slap in on electronic paper.  I did say
I just woke up with this idea :D

Then we can have a "contact patch" object to fake this for us.  As long
as we have objects talking to one another any object can be upgraded
when the Desktop Cray is sold :)

A tool could be made so people could customize how a "new" compound
grips the road, ice, dirt, mud.

That's why go-karts is an easy start.. people like results.  Besides
once the go-kart version is done.  The multiplay can get started.  Even
with a 80% GPL engine to work with I think we could all get the driving
sims we want.  I read LeadFoot is going to be more arcade than DTR :-(
Sims are not popular for sales so we can make our own :)

Sounds great.  Email me if you have a speciality.  Maybe you can help
review my object communications?  A solid foundation will make this
soar!

--
Jason Monds       "Insert Witty Remark Here"        theCLAPPER in Kali
http://members.home.net/gpl.mondsj/gpl     - My combined gas/brake
setups
http://members.home.net/stuff.mondsj/n3prc - N3 Pro Racing Club
(Remove 'no spork' when replying)

Jason Mond

My car sim project...

by Jason Mond » Tue, 25 Jan 2000 04:00:00

Hi Valter,



> > ... 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.
> > ...

> Well, I have been thinking of similar things myself, only I came to an
> opposite conclusion. I feel that your physical model is too simple. I
> have played a lot of Test Drive 5 lately, and the model *sucks*. It's so
> simple that cars handle like shit. I think the physical model should be
> far more elaborate, with tire flexibility, shock absorbers and spring
> stiffness, weight ditribution and moments of inertia, center of gravity
> positions, motor torque curve, etc...

I was going to have all that stuff, but a go-kart is really simple and
it's a place to start :)  Driving a Corvette in TD5 should not handle
like a go-kart, I agree.

--
Jason Monds       "Insert Witty Remark Here"        theCLAPPER in Kali
http://members.home.net/gpl.mondsj/gpl     - My combined gas/brake
setups
http://members.home.net/stuff.mondsj/n3prc - N3 Pro Racing Club
(Remove 'no spork' when replying)

Valter Hilde

My car sim project...

by Valter Hilde » Tue, 25 Jan 2000 04:00:00


> ...
> I was going to have all that stuff, but a go-kart is really simple and
> it's a place to start :)  Driving a Corvette in TD5 should not handle
> like a go-kart, I agree.
> ...

So, let's start a "free racing" project. I can contribute with the
physical models (I'm an engineer working with communication satellites
dynamics, so I can handle the models part). Also, what if people all
around the world could contribute with video tapes of their cities? We
could get some really nice race sequences, with local police thrown in!
I have done programming in OpenGL in both m$-windoze and Linux, so I can
contribute on that as well. Let's rumble!
Jason Mond

My car sim project...

by Jason Mond » Tue, 25 Jan 2000 04:00:00

I have this program too.  It's neat :-)  It could help with collision physics.

Thanks,
Jason.


> There is an international crossplatform basic simulation of automated racing

> available called RARS (Robot Auto Racing Simulator). (see below).

> If you have access to a C++ compiler, you can put together
> the low level AI routines an create an AI to compete.
> It's fun to play with. The graphics included (at the time I looked at it)
> were an overhead shot of fairly complex tracks showing the car
> positions as the race progressed.

> http://www.ebc.ee/~mremm/rars/rars.htm and
> http://home.planetinternet.be/~pascutto/index.html

--
Jason Monds
http://members.home.net/gpl.mondsj/gpl - For my combined gas/brake setups
http://members.home.net/stuff.mondsj/n3prc - Nascar3 Pro Racing Club
(Please remove 'no extra spork' when replying)
Jason Mond

My car sim project...

by Jason Mond » Tue, 25 Jan 2000 04:00:00

There is g++ for Linux.  That might be better.  Java is portable but speed
will be factor here and I don't think Java will cut it.

Jason.


> Maybe you could get a Java Linux Open GL project going.  I just read that
> OGL is now fully supported in Linux so it would be easier to test the
> graphics side of the project.  I suggest Java because it is much easier to
> port (or so I hear) than C++ and I suggest Linux because I have a feeling
> that by the time the project creates something interesting we will all be
> using Linux anyway.  If I could program worth a damn I'd help :)

--
Jason Monds
http://members.home.net/gpl.mondsj/gpl - For my combined gas/brake setups
http://members.home.net/stuff.mondsj/n3prc - Nascar3 Pro Racing Club
(Please remove 'no extra spork' when replying)
Jason Mond

My car sim project...

by Jason Mond » Tue, 25 Jan 2000 04:00:00



> > ...
> > I was going to have all that stuff, but a go-kart is really simple and
> > it's a place to start :)  Driving a Corvette in TD5 should not handle
> > like a go-kart, I agree.
> > ...

> So, let's start a "free racing" project. I can contribute with the
> physical models (I'm an engineer working with communication satellites
> dynamics, so I can handle the models part). Also, what if people all
> around the world could contribute with video tapes of their cities? We
> could get some really nice race sequences, with local police thrown in!
> I have done programming in OpenGL in both m$-windoze and Linux, so I can
> contribute on that as well. Let's rumble!

Now that's enthusiasm :-D

I know other "free racing" projects exist, but I'm not sure what status they
are in.  I'm a good project manager and get the IS programming done around
here so I wanted to start a project that would be a challenge yet fun!  The
physics would not be my strong point, but if I programmed the object
communcations and someone else, like yourself, coded particular physics then
we would have a great sim engine to build any racing game... TD6 or ICR3 or
SODA2.

I will put you on a contact list.
Thanks,
Jason.

--
Jason Monds
http://members.home.net/gpl.mondsj/gpl - For my combined gas/brake setups
http://members.home.net/stuff.mondsj/n3prc - Nascar3 Pro Racing Club
(Please remove 'no extra spork' when replying)

Morgan VW

My car sim project...

by Morgan VW » Tue, 25 Jan 2000 04:00:00

I've been thinking of something like that for the past couple of months. I'm
not a *real* programmer though. I know a little C and C++, but I'm not really
interested in all that technical stuff to get very far. Especially considering
the complexities of game programming. I'd just like to create a completely open
game engine with graphics and basic physical and AI stuff hard-coded in, but
all vehicle, motor, transmission, AI routines, and other such aspects variable
within plain text files and maybe more fundamental code editable from separate
dlls. I'm really thinking more of a really good NASCAR sim (since Sierra won't
allow Papy to release the real N3), but the game could be modified to
accomodate just about any sort of auto racing. That's just off the top of my
head. I haven't really givin it all much thorough thought. It's really just a
fantasy, but it's fun to think about nonetheless.

And to me, AI is very important. That would be one of the most fun parts.
Coding truly realistic AI. With very good network code as well for those of you
with fast connections and those of us that hope to get faster connections in
the future. But even with good multiplayer code, playing around with car files
and driver lists like in N3/NL is just plain fun. AI shouldn't be neglected.
Even Carmack wants to do a more single-player-focused game next time around. :)

Jason, if you think you can do it, then do it! We need all the true sims we can
get our hands on especially considering how many companies are publishing
arcade games marketed as sims.

--
-----------------------------------
Morgan Vincent Wooten

http://members.tripod.com/~morganv/
-----------------------------------


Michael Basde

My car sim project...

by Michael Basde » Tue, 25 Jan 2000 04:00:00

If you folks need some help with the artsy side of things, just let me know!
I'm an electrical engineer by trade, but have been known to make some pretty
mean cars as well.  I'd be willing to take on other things too, although I might
need some 'coaching' to refresh my programming skills.  :0)

Mike


> There is g++ for Linux.  That might be better.  Java is portable but speed
> will be factor here and I don't think Java will cut it.

> Jason.


> > Maybe you could get a Java Linux Open GL project going.  I just read that
> > OGL is now fully supported in Linux so it would be easier to test the
> > graphics side of the project.  I suggest Java because it is much easier to
> > port (or so I hear) than C++ and I suggest Linux because I have a feeling
> > that by the time the project creates something interesting we will all be
> > using Linux anyway.  If I could program worth a damn I'd help :)

> --
> Jason Monds
> http://members.home.net/gpl.mondsj/gpl - For my combined gas/brake setups
> http://members.home.net/stuff.mondsj/n3prc - Nascar3 Pro Racing Club
> (Please remove 'no extra spork' when replying)

Jason Mond

My car sim project...

by Jason Mond » Tue, 25 Jan 2000 04:00:00


> I've been thinking of something like that for the past couple of months. I'm
> not a *real* programmer though. I know a little C and C++, but I'm not really
> interested in all that technical stuff to get very far. Especially considering
> the complexities of game programming. I'd just like to create a completely open
> game engine with graphics and basic physical and AI stuff hard-coded in, but
> all vehicle, motor, transmission, AI routines, and other such aspects variable
> within plain text files and maybe more fundamental code editable from separate
> dlls. I'm really thinking more of a really good NASCAR sim (since Sierra won't
> allow Papy to release the real N3), but the game could be modified to
> accomodate just about any sort of auto racing. That's just off the top of my
> head. I haven't really givin it all much thorough thought. It's really just a
> fantasy, but it's fun to think about nonetheless.

I'm looking to build a physic/graphics/controller/sound engine with built in
editors to add new cars (including the parts) and tracks.  The AI will be added
last, since multiplay would get more people interested in the project to
contribute.

I think I can :-D

I really don't have all the physics knowledge, but I have a basic graphics engine
and the desire to build a car model.  With an open source project like this, once
the foundation is there I'm sure people who know the physics will contribute.
Understand that table driven routines may have to be used for certain objects until
we get desktop Crays :-)

Aside: When driving into work, I was envisioning the "objects" in my real car
interacting.. LOL  This afternoon I was thinking on the layout of a text display
for all the inputs/outputs of the various objects in the simulation.  Oh man, I'm
gonna lose sleep ;-)

> --
> -----------------------------------
> Morgan Vincent Wooten

> http://members.tripod.com/~morganv/
> -----------------------------------



> > Hello everyone,

> > I woke up this morning with thoughts of racing SCGT in my head - please
> []

> > So am I insane for thinking about this?  Hehe.

> > Jason.
> > --
> > Jason Monds       "Insert Witty Remark Here"        theCLAPPER in Kali
> > http://members.home.net/gpl.mondsj/gpl     - My combined gas/brake
> > setups
> > http://members.home.net/stuff.mondsj/n3prc - N3 Pro Racing Club
> > (Remove 'no spork' when replying)

--
Jason Monds
http://members.home.net/gpl.mondsj/gpl - For my combined gas/brake setups
http://members.home.net/stuff.mondsj/n3prc - Nascar3 Pro Racing Club
(Please remove 'no extra spork' when replying)
Jason Mond

My car sim project...

by Jason Mond » Tue, 25 Jan 2000 04:00:00

I put you on the contact list.

Thanks,
Jason.


> If you folks need some help with the artsy side of things, just let me know!
> I'm an electrical engineer by trade, but have been known to make some pretty
> mean cars as well.  I'd be willing to take on other things too, although I might
> need some 'coaching' to refresh my programming skills.  :0)

> Mike

--
Jason Monds
http://members.home.net/gpl.mondsj/gpl - For my combined gas/brake setups
http://members.home.net/stuff.mondsj/n3prc - Nascar3 Pro Racing Club
(Please remove 'no extra spork' when replying)

rec.autos.simulators is a usenet newsgroup formed in December, 1993. As this group was always unmoderated there may be some spam or off topic articles included. Some links do point back to racesimcentral.net as we could not validate the original address. Please report any pages that you believe warrant deletion from this archive (include the link in your email). RaceSimCentral.net is in no way responsible and does not endorse any of the content herein.