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 / Pathing for AI? For a Space Fighter Game. Please help!

Author
Message
DBasic Khan
20
Years of Service
User Offline
Joined: 3rd Dec 2003
Location: Alpha Quadrent, Sector 1,1 SOL SYS
Posted: 5th Jan 2004 20:31
Im playing with dbgasic right now and im working on a Rouge Squadron type game. I have been trying to think of a way to get an ai for the enemy squadrons to work. After reading about the way the game rouge squarons handels it i have decided to do it that way. ROuge squadrons ships follow paths laid out in the level design. that way they can have the ships fly in whatever pattern they want. The enemies follow this path until they get shot at (well actualy only when their lead fighter gets shot) and then they all break up, wiggle around to try and shake you off and then regroupe onto the path.

I want to do some thing similar. So does any one know how to make objects follow paths in dbasic?
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 6th Jan 2004 00:39 Edited at: 6th Jan 2004 03:20
The concept is really simple, but you have to take it in parts. First of, objects rarely follow paths as much as they go from way point to way point. You need to populate an array with way points (just a list of 3D coordinates.) You then need to write code so that one object can turn and move towards the first way point. When that object gets close, it selects the next way point in the list and starts moving for that.

Once you get one object to follow a path of way points, you can start on formation movement and the detection of enemy units.
--
TAZ

Login to post a reply

Server time is: 2024-11-25 23:48:19
Your offset time is: 2024-11-25 23:48:19