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.

DarkBASIC Discussion / An idea for AI

Author
Message
Hell Forged Angel
22
Years of Service
User Offline
Joined: 3rd Jan 2003
Location: United Kingdom
Posted: 13th Mar 2004 16:19
Hmmm just read another post about AI. Once again it was suggested that for a simple chase the player AI you just make it follow the player and detect it walking into walls and get it to turn if it does. However this is my point:

Does it not look very stpid if the enemy keeps walking into walls?

To combat this i came up with the idea of placing a hidden object infront of the enemy. This object moves with the enemy so its always in the same position relative to the enemy. Now instead of detecting the enemy walking into walls detect for collision with the hidden object. The basic idea being that because the object is infront of the enemy they will turn around before they hit the wall (ie when they see it). I was wondering if anyone could foresee any side effects with this as im A) Not very good at programming and B) Havny used DB for ages.

P.s i use DBC

Darkness will claim us all
hexGEAR
22
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Naytonia
Posted: 13th Mar 2004 16:56 Edited at: 13th Mar 2004 16:58
the problem with all these unorthodox methods is they hardly work for most situations, you'd be better off using waypoints or grids.

For a simple chase A.I. you could log the players coordinates at a certain rate and make the computer follow these coordinates... kinda like you making tracks in the snow and someone chasing you using your tracks as a guide.

The problem though is if you don't sample the coordinates fast enough you could end up with the same problem as:

in this case, the sample rate is high and the enemy could easily follow the logged coordinates "o" of the player around the wall "---"

o...o...o...o...o..
----------------- o
............o...o.....

in this case the sample rate is low and the enemy hit's the wall trying to get from the 3rd corrdinate to the 4th.

o.......o.......o...
----------------- .
.............o........

Hell Forged Angel
22
Years of Service
User Offline
Joined: 3rd Jan 2003
Location: United Kingdom
Posted: 14th Mar 2004 16:21
Thanks Hexgear for clearing that up. .

Darkness will claim us all

Login to post a reply

Server time is: 2025-05-23 11:26:07
Your offset time is: 2025-05-23 11:26:07