PDA

View Full Version : car racer



Wizard
21-12-2006, 01:44 PM
I built a starfighter game with delphi and delphix, so i know a bit about DelphiX. What I wanted to know is if there a site or link somewhere with pointers on how to build a car game.....the dynamics of driving a car, steering, etc.

WILL
21-12-2006, 03:06 PM
Wizard I left you a Private Message about your 2nd thread please check your messages and read.

jasonf
21-12-2006, 03:14 PM
What you're asking is basically a physics question. You might want to look into using Netwon or ODE. It's certainly not a DelphiX issue. You'll be using DelphiX as the basic sprite engine but the car handling would be handled by the physics engine.

If I was writing a serious racing game, I'd use Newton or ODE.

If it was just a simple game then I'd fudge some calculations together.


You might want to look at one of these books
Link (http://www.amazon.com/s/ref=nb_ss_gw/002-8270786-3056825?url=search-alias%3Daps&field-keywords=physics+for+game+developers&Go.x=0&Go.y=0&Go=Go)

I own a copy of Physics For Game Developers by O'Reilly

That has some stuff on Car handling I think... it's been a while since I read it.

WILL
22-12-2006, 04:57 AM
for car physics you could use a physics engine like Newton. ( http://www.newtondynamics.com )

In the interest of keeping your conversation going I've copied what NecroDOME wrote here and deleted the other thread as this had more info on it. (Sorry Michiel, I owe ya a post. ;))

Wizard, if you were more interested in the design rather than physics please let me know and I'll move it to design instead. Just know that you've gone beyond the defines of the DelphiX library so to suit your question(s) better it's best to be asking from another topic standpoint.

Besides that, what specific part(s) of car games where you interested in? Are we talking about 3D racing games with all the physics in it?

Wizard
22-12-2006, 05:33 AM
Thanks for moving my post to the correct forum, Will. As to my question I would love to start with a complicated 3d car racer game...but I think I should first take baby steps and start with a simple 2d racer. 2 Cars on a drag race or something, with a good map and sound effects :-) I will check out the Newton site and maybe build from there. I downloaded 3D Developer Studio a while back...but a lot of the stuff in there is fairly complicated.

BTW: I see that I'm now a 5 Bit Warrior :D

jasonf
22-12-2006, 11:19 AM
Good luck on writing your car game. It should be nice and simple to make in 2D using DelphiX, although you may want to look at some of the alternatives for future projects as you'll soon reach the limitation for DelphiX.

I've never written one myself, but I imagine the AI for the opponents would be a bit more complicated than a shooter as the opponent cars have to find their way around the track.

This can be done by using a waypoint system. As the opponent car reaches one waypoint, it is informed of the next and steers towards it. Some waypoints can have flags to say that the opponent should hit the brakes because of a sharp corner and other waypoints could tell the opponent to go faster down a straight part of the track.

2D or 3D, you'll still have the AI system to consider.

Best of luck. :)


BTW: do you have a link to your starfighter game? I'd be interested in playing it. 8)

Wizard
27-12-2006, 06:21 AM
Thanks for the replies guys :-)

Nope, unfortunately I do'nt have a link where my starfighter game can be posted.

Happy coding all :-)