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://members.home.net/gpl.mondsj/gpl - My combined gas/brake
setups
[link lost in import]
(Remove 'no spork' when replying)
Proposal for an open, community-built racing sim
Jason Monds proposed starting a community racing sim project, beginning with a simple go-kart physics model and adding multiplayer before AI. Volunteers offered physics, art and neural network AI help, and others suggested RARS, CAD-based tools and table-driven physics models, while debating C++ versus Java for speed.
community/metaphysics/realism debate
Automated summary.
Hi Jason,
Interesting stuff.
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
Quoted text (8 lines)
>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++.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
--
Matthew V. Jessick Motorsims
Vehicle Dynamics Engineer (972)910-8866 Ext.125, Fax: (972)910-8216
Quoted text (8 lines)
> 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 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.
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 :)
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)
Hi Valter,
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)
Quoted text (13 lines)
> > ... 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.
> ...
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!
I have this program too. It's neat :-) It could help with collision physics.
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)
Quoted text (12 lines)
> 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.htmlThere 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)
Quoted text (13 lines)
> > ... > > 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!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/
-----------------------------------
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
Quoted text (20 lines)
> 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)Quoted text (12 lines)
> 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.Quoted text (24 lines)
> -- > ----------------------------------- > 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)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)
Regardless of how the final 3d objects are coded,
at the front end they should be built with tools
that can export a common CAD-type file.
Something like IGES or DXF, that can be read
and exported by Autocad, 3D Studio, or any
other CAD program. This would go for all
cars, tracks, and trackside objects.
When it comes time to build some 3D models of
cars and things, I should be able to help a lot.
--
Pat Dotson
IMPACT Motorsports
http://www.impactmotorsports.com/pd.html
Quoted text (10 lines)
> 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.> 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).
Speaking as a former orbit mechanic, you are starting down a
slippery slope! :)
--
Matthew V. Jessick Motorsims
Vehicle Dynamics Engineer (972)910-8866 Ext.125, Fax: (972)910-8216
> 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 :-)
Please understand that in real high powered engineering modeling work,
one uses a lot of tables. Tables aren't bad. (Let's say that again ;)
Tables aren't bad. (It just depends what the tables are about ;)
It might take the aerodynamicist a month to summarize weeks of
aero simulation runs into 20-400 tables to describe the vehicle's
behavior over a (hopefully) fairly comprehensive set of conditions.
But none of his runs use high fidelity in _everything_, just in aero.
For instance, he'll "trim" the vehicle and maybe guess at
the control surface moments to do that. But he'll use a constant
CG location. By the time he's done, the size of the vehicle
will have changed. He doesn't know yet that the force
required is beyond the machines capacity.
That's the flight control groups simulation.
Each little group has it's own major interest. Each simulation
in turn concentrates on and tests different things. They take
the "summary" analysis (expressed in tables, etc.) of the
other groups and add their own area of high fidelity to the mix.
So by the time you get aero, mass properties, trajectories,
flight control gains, etc., etc., all working in a realtime simulation
to, for instance, test the flight computer, almost every subsystem
is modeled heavily using tables of results at their core.
Tire models may use analytic equations rather than tables,
but those equations are just fits to tables of spotty experimental
values and probably extrapolate pretty far afield from the data
anyway. ;)
Tables are good, tables are cool.
So build up some fast table look up (TLU) routines
for your sim! :)
--
Matthew V. Jessick Motorsims
Vehicle Dynamics Engineer (972)910-8866 Ext.125, Fax: (972)910-8216
What about using neural network for the AI?
That way the AI will learn the tracks to know just like a normal
player, and it will interact with others just like the players.
Even though I don't know any C++, I know a god deal about java and I'm
willing to contribute with some NN code. Using java for the
multiplayer code is a good idea as well. Q3 does.(I think...)
--
Ole-Martin
http://frodo.hiof.no/~olemmork/
"The universe either had a beginning or it did not" - Edwin A. Abbot
: What about using neural network for the AI?
: That way the AI will learn the tracks to know just like a normal
: player, and it will interact with others just like the players.
Didn't SODA learn the tracks created by the player? Sometimes it took a
long time on a slow computer, but I thought this was a tidy bit of
programming.
Stephen
Hi,
> What about using neural network for the AI?
> That way the AI will learn the tracks to know just like a normal
> player, and it will interact with others just like the players.
> Even though I don't know any C++, I know a god deal about java and I'm
> willing to contribute with some NN code.
I put you on the contact list. Thanks.
I downloaded the java.sun.com SDK and it looks powerful in the graphics
area :-) I'm not sure how fast it is though. What is your opinion on
speed with Java or Borland C++ or Linux G++?
I don't know what Q3 uses, I'm a Tribes player :-)
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)
Hi Matthew,
I don't think this project will put you out of business ;-) It will give
those who participate a place to use some of these ideas that we always
thought about but never started :-D It's is the year 2000 after all, time
for a change :-)
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)
Quoted text (11 lines)
> > 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). > Speaking as a former orbit mechanic, you are starting down a > slippery slope! :) > -- > Matthew V. Jessick Motorsims > Vehicle Dynamics Engineer (972)910-8866 Ext.125, Fax: (972)910-8216Wouldn't that be great! Someone comes up with a new track. You install
it on your system and then, while you're trying to figure out the best
line, speed etc you find the AI drivers out there doing the same. Can't
see it happening like this, but it would be nice. :-)
--
Peter Ives - (AKA Ivington)
No person's opinions can be said to be
more correct than another's, because each is
the sole judge of his or her own experience.
Hehe, I was more concerned with someone starting down a path
that might end with their hobby as their career. ;)
--
Matthew V. Jessick Motorsims
Vehicle Dynamics Engineer (972)910-8866 Ext.125, Fax: (972)910-8216


































