Project Artificial Intelligence Racing - A.I.R (Demo ver 0.05 & Video Available)

http://i300.photobucket.com/albums/nn10/Nycholas3D/A.I.R%20-%20LOGO_zpso5pzcbga.png

It is still a work in progress, and the code is not commented or well organizer, I would recommend caution when playing with the file.

Download the demo HERE:
Blender Racing.zip (5.7 MB) ver - 0.05 WITH textures!

Later versions:
ver - 0.04 No textures, sorry…

1 Like

WOW THIS LOOKS ELEFANTASTIC! sorry for caps o.o but for me it is the first racing game which is well built in BGE o.o

Nice work. Are you using a combo of path following and waypoints? I haven’t made race game before, but I’m guessing that’s how it’s done. Looks really smooth. :slight_smile: Well done.

Thank you RockyMadio, I hope this helps the community, this is, after all, my first contribution regarding AI…

It’s more waypoints than path finding, since there are no alternative roads, using waypoints seemed more strait forward…

Thank you very much for the feedback, all comments and critiques are welcome!

Is the demo just for mac?I am on windows 8.

Looks really interesting. How are the cars calculating their path? Are the drawlines an illustration of raycasting? They’re pretty good at avoiding crashes. :slight_smile:

No it’s a .blend

The def controllerAI() inside the Script “carControll.py” does the controlling of the vehicle in this file you will find all the calculations.
The lines that are the SAME COLOR as the Car’s Stripe are Vectors that are used in the calculation of the Path he needs to follow.
The WHITE line is used to calculate the Angle to the furthest point of the Track possible in the current speed of the vehicle.
The RED line that eventually appears is the Ray casting that verifies proximity of other vehicle, in other words, the eyes of the driver.

Nicely done!!!. For the first time I see a working and smart racing AI !! I really like how the cars are avoiding each other.
I’ve got one problem with the blend file, did you pack textures with it becouse I don’t see them.

I pack it all into the .blend, glad to know you liked the demo Araagon.

On my computer it just crashes.

How good/complex are the physics for the cars? IMHO they take turns a little bit faster than I would think they would.

Anyway nice AI! Smooth and enjoyable to watch. Good job on that!

Nice! Very smooth and +respect for actually using group instances.

Problems

Textures be missing

Console error spam fixed by changing line 144 motor.py

playAud("Jetta_Shift.wav",pitch=1.2)

Occasional pileup + segfault in 2.73a (couldn’t replicate with latest debug build)

just saw a car fly across the screen out of the corner of my eye
What!?? Awesome.

Here is the error i get.

Read new prefs: C:\Users\barbara\AppData\Roaming\Blender Foundation\Blender\2.72\config\userpref.blendfound bundled python: C:\Program Files\Blender Foundation\Blender\2.72\pythonread blend: C:\Users\barbara\Desktop\Blender Racing 0.04.blendTraceback (most recent call last):  File "C:\Users\barbara\Desktop\Blender Racing 0.04.blend\carControll.py", line 1, in ImportError: No module named 'bge'

great, but I can not download it

Hi, great, but I can not download it

This is AWESOME!!! Best blender racing game AI I’ve seen so far :smiley:

The car is using the car constraints physics similar to the one found HERE It’s quite good, also In the Motor.py Script I implementer the car’s gear ratio explained HERE and HERE also the gear values in:
line 122: GearRatio = [3.78, 2.12, 1.27, 0.87, 0.66]
Are the actual value for this model of Jetta. So the speed of the vehicle for example in first gear at 2000 RPM is the actual speed that the real Jetta would go at.
line 165: maxSpeed = ((82.1 * own[“RPM”]) / (GearRatio[own[“GEAR”]]*3.42))/1000

The RPM can be calculated from the current speed:
line 136: own[“RPM”] = ( ( (ownSpeed*1000) * (GearRatio[own[“GEAR”]]*3.42) ) / 82.1 ) + power
power is the power that the driver is applying to the car, in other words, the gas.

Sorry I forgot some textures, it’s probably from the driver model… Also the audio issue is something that I don’t know how to solve, the current audio actuator and library could use some changes or I don’t use it right…

Apparently you geting and error importing the blender game engine library, strange I don’t know how to address that… sorry…

Thank you friend, feel free to use it in the Festival of Speed, but I’ll soon updated it again with some better features…

I already left a comment.He said i was having problems importing the blender game engine library.And it does not work in wireframe for me.

I think your crashing problem will be resolved by updating blender.
There was a problem with 2.72 crashing on Windows64(?) when creating constraints such as vehicles.

The import error is unrelated. Looks like the script is trying to auto-run. On my system it throws a message about skipping because BGE was imported.

Lostscience what version of Blender are you using? Pqftgs has a point, I made this demo using a mac and Blender 2.73a