[WIP] Driving Game

Hello. I posted a while back to ask for tips on how to make a functional driving game and after that I set off to create one.

It doesn’t have a name or anything yet because I’m still messing around a bit, seeing what works and what doesn’t. Anyway basically you drive a Mini Cooper around a warehouse and you can drive up the ramp and smash through the window.

There will be two parts to the game at the moment, the warehouse and a racetrack. What will happen is you drive through the warehouse, drive to the exit that will say “Racetrack” and when you drive through this it will take you to the next scene which will be a racetrack.

I’ve already modeled and textured the racetrack (just need to add trees and stuff) and the warehouse was completed a while ago. My friend also tested the scene changes and they work well.

Here are some screenshots of what’s been done:

http://i393.photobucket.com/albums/pp18/SpewBoy2/Blender/th_mini1.jpg

http://i393.photobucket.com/albums/pp18/SpewBoy2/Blender/th_mini2.jpg

Here’s a little video I put on youtube:

Now. There are still a few things I would like to try to implement before turning this into a proper game. One of these is python controlled acceleration and braking. I am not good with python and so I don’t know how to implement the code. If any of you more experienced programmers could just help me a bit there that would be great. Another nice thing would be to have gears, which kind of leads on from my other question.

Thanks and please help if you can. Any help at all would be appreciated. I’ve included the .blend file in this post. It contains only the warehouse as the track is not completed yet. You can use this to see where I would place the python scripts I need.

.blend file: http://rapidshare.com/files/160486947/mini_smaller.rar.html

Oh, and this is the type of python script I was talking about to try to implement. I just don’t know where to put it really:

# get the sensor named Throttle
gasPedal = controller.getSensor("Throttle")

# get sensor named Brake
brakeReverse = controller.getSensor("Brake")

# gas pedal 
if gasPedal.isPositive() == True and brakeReverse.isPositive() == False:
    force = -2000.0
            
# brake and reverse    
elif brakeReverse.isPositive() == True and gasPedal.isPositive() == False:
    force = 1700.0
    
else:
    force = 0.0

SpewBoy