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 / enemy avoiding solids?

Author
Message
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 1st Sep 2007 06:03
hi,whats a good way to make my enemy or npc move toward my player but avoid solid obstacles???

i know how to make it move toward my player,im not sure how to make it avoid the obstacles.
tikki
17
Years of Service
User Offline
Joined: 1st Aug 2007
Location:
Posted: 1st Sep 2007 06:42
i'm no pro, and havnt even started a project, but do know programming. this may not be the best method, but could work.
idea:
make 4 sensors (plains, 1x1) for the enemy, 1 infront, 1 to left, 1 to right, 1 to back. make them limbs. offset them to a distance you like. use intersect object to detect the walls.
so if there is a wall infront have him move left or right, if theres a wall infront and on left, have him move right, etc.

like i said, possible not the best, but would work. sorry if this method is completly....a waste of coding.

RAWR!
Veron
17
Years of Service
User Offline
Joined: 22nd Nov 2006
Location:
Posted: 1st Sep 2007 10:38
I'm fairly sure Dark A.I has commands for avoidance detection and all that.


[center]
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 1st Sep 2007 13:33
Just make a raycast (intersect object command, or better, sparky's dll) come out from infront of the enemy. If that intersects a solid object, turn away.

"It's like floating a boat on a liquid that I don't know, but I'm quite happy to drink it if I'm thirsty enough" - Me being a good programmer but sucking at computers
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 1st Sep 2007 23:38
ok cool!! thank you alot guys!!!!

i actually thought of using hidden boxes to the sides & front of them. lol

Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 2nd Sep 2007 00:55
Dark AI offers you simple avaoidance of all solid objects which you specify as obstacles

Tikkis technique will work fine, but will be pretty performance heavy if you have alot of enemies.

Zotoasters technique is probably the most classic, but to make the enemy in any way intelligent is going to need alot of code.

David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 2nd Sep 2007 01:06
dark ai sounds cool but im not buying anything else from tgc til they at least update dp. i mean all i want is a character controller that can jump. is that too much to ask??

turning left and right with some kind of dp commands would be cool too instead of the turn object left/right.

u try to have a camera follow using these commands and your camera wont follow right.

anyway ill probablly get dbpx10 when it comes out.(maybe) since i might need a new pc to go with it. :/
Veron
17
Years of Service
User Offline
Joined: 22nd Nov 2006
Location:
Posted: 2nd Sep 2007 04:23
Quote: "u try to have a camera follow using these commands and your camera wont follow right."


You must be doing something wrong then, i've gotten a following camera to work fine, as have many other members.


[center]

Login to post a reply

Server time is: 2024-09-27 05:07:47
Your offset time is: 2024-09-27 05:07:47