Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Racing Game Help Please!

Author
Message
Daris Xiao or Benjy Wright
20
Years of Service
User Offline
Joined: 13th Dec 2003
Location: Face first in a bowl of soup.
Posted: 13th Dec 2003 20:50


I am having serious trouble trying to develope Artificial Intelligence (AI) for a gokart racing game that I'm making.
Somebody please help me...
Daris Xiao or Benjy Wright
20
Years of Service
User Offline
Joined: 13th Dec 2003
Location: Face first in a bowl of soup.
Posted: 13th Dec 2003 21:05


Right now, the Martix-Track is higher on the sides than in the middle, the cars move forward at a set pace. When the cars height increases, they turn toward the side that is lower in relation to their present height.

I used the Ground-Tilting code from the tank2 demo to tilt the karts, but They are really glitchy. They go off of the track sometimes, and hit the walls, and when they recover, they sometimes start going backwards.
Damokles
21
Years of Service
User Offline
Joined: 28th May 2003
Location: Belgium
Posted: 13th Dec 2003 21:05
It depends on the complexity of your game :
In a simple game, you shall get some waypoints on your track (1,2,3,4,...)
When an ennemi Kart is on waypoint 4, it shall be redirected to waypoint 5 and head for it, etc.

"Begin at the beginning, and go on till you come to the end: then stop." - Lewis Carroll
Daris Xiao or Benjy Wright
20
Years of Service
User Offline
Joined: 13th Dec 2003
Location: Face first in a bowl of soup.
Posted: 13th Dec 2003 21:10

Yeah...I thought of that but I started having problems with the karts facing the wrong ways. The track I'm using is just a square for now... I'm not going to use anything Super-complex like on F-Zero for the Game-Cube, so what I need doesn't need to be really complicated.
Damokles
21
Years of Service
User Offline
Joined: 28th May 2003
Location: Belgium
Posted: 13th Dec 2003 21:12
Facing the wrong way ? You have have to check the position of the next waypoint, then you point the object to that position, then simply MOVE OBJECT.
That's the simplest you could do ... without them getting out of the track.

"Begin at the beginning, and go on till you come to the end: then stop." - Lewis Carroll
Daris Xiao or Benjy Wright
20
Years of Service
User Offline
Joined: 13th Dec 2003
Location: Face first in a bowl of soup.
Posted: 13th Dec 2003 21:17

But...
If I use a "point object" command the Karts just point instantly.
I need to do it with smooth turning...How could I do that?
Damokles
21
Years of Service
User Offline
Joined: 28th May 2003
Location: Belgium
Posted: 13th Dec 2003 21:53
ROTATE OBJECT

"Begin at the beginning, and go on till you come to the end: then stop." - Lewis Carroll
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 13th Dec 2003 21:56
before the refresh (sync), point the object at the waypoint and get the object angle, then set it back to what it was, then use curvevalue to make it swing around in a smooth curve onto the new heading.

Mentor.

System spec : Pentium 3.0Ghz, 512MB DDR, 2x160Gb HD`s, DVD RW/CD RW (all modes), multimedia front panel, 6 way surround sound, ATI radeon 9800 128mb.
Daris Xiao or Benjy Wright
20
Years of Service
User Offline
Joined: 13th Dec 2003
Location: Face first in a bowl of soup.
Posted: 13th Dec 2003 21:56
And no more
I've figured it out, Commander!
Limey! This thing had better work!

Thanks!

For anyone whose wondering about my solution:
I just detect for the position of the next check point thing, and figure its position, and the angle the kart would point to face it, then gradually inc/dec the Y-angle of the kart until it faces it. No more tilted tracks for me! YEAH! THE POWER IS MINE!
Thanks to DarkBasicPro!
Daris Xiao or Benjy Wright
20
Years of Service
User Offline
Joined: 13th Dec 2003
Location: Face first in a bowl of soup.
Posted: 13th Dec 2003 21:57
Hey, Mentor. I figured it out just before you posted, Thanks Anyway!

Login to post a reply

Server time is: 2024-09-21 12:01:34
Your offset time is: 2024-09-21 12:01:34