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 / More AI help please

Author
Message
DBasic Khan
20
Years of Service
User Offline
Joined: 3rd Dec 2003
Location: Alpha Quadrent, Sector 1,1 SOL SYS
Posted: 28th Jan 2004 20:28
I decided to take a hiatus from my AI and work on other elements, but i think its time to get back to AI now. Im still not sure on what to do though. I think im going to use a waypoint system but still problems remain. I made a simple test program to, well, test my ideas for AI. I found several problems

1. when my object reaches the waypoint it flips instantly (its programed secificaly to point in the direction of the other object), instead of turning graudualy. I.E. it will be going in one direction then the opposite. I know there are other methods of telling it to turn i just havnt figured themout yet, so i was hoping you could explain them to me.
2. My only solution so far has been to make a really long box that sticks out of the ship. so when the ship hits point A, it turns slowly to the left until the realy long object hits point B, then the object its told to point twards point B, witch causes the ship to graudualy fall back into a strait line between the two points. I tried this breifly but it slowed the comp down.

So what do i do? Do you guys have any other ideas??? I would also like allitle bit mor intelligence than just flying between 2 points. I want the ships to be able to shoot at my ship too! And finaly how do the makers of big games make em? I know for a fack that there are no waypoints in combat flight sim! nor to my knowlage any in BF 1942. SO how r bot programed to fly/drive/walk in games like that?!?!?
-Khan
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 28th Jan 2004 21:31
Search the forum for AI turning code, it was covered just a few weeks back.
--
TAZ

DBasic Khan
20
Years of Service
User Offline
Joined: 3rd Dec 2003
Location: Alpha Quadrent, Sector 1,1 SOL SYS
Posted: 29th Jan 2004 20:25
Taz,
I cant find anything by searching for AI turning. Ive tried a bunch of diffrent variations on it. Also do you konw of any tutorials/posts in regards to the last half of my message(the part about non-waypoint AI)
DBasic Khan
20
Years of Service
User Offline
Joined: 3rd Dec 2003
Location: Alpha Quadrent, Sector 1,1 SOL SYS
Posted: 29th Jan 2004 20:41
I had an idea for my AI, i want to know what you think.

The enemy ships will fly in circles constantly, untill the player ship enters a specific range (lets say 5units). The enemy will detect if the player ship has entered range like this:
(player = obj 1, enemy = obj 2)

move object 2,.2
turn object left 2,.5
em=1
move object 2,5
move object 2,-5
em=0
if em=1
if object collision(1,2) then print "collision"
endif

Do you think this system will work? I have been experiminting with a test program and havnt quiet got it but im sure i will. But do you think this system is effective.
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 29th Jan 2004 21:17
One idea is to set temporary way points and move the fighter towards that goal based on its performance capabilities. Since a waypoint is just a 3D coordinate you can use it to apply tactics such as charge, flank, or retreat.
--
TAZ

Login to post a reply

Server time is: 2024-11-26 01:47:38
Your offset time is: 2024-11-26 01:47:38