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 / how do i make an object move around another object when trying to chase the player

Author
Message
bigbrother 2000
20
Years of Service
User Offline
Joined: 15th Oct 2003
Location: UK
Posted: 13th Apr 2004 21:19
i would like the enemies in my game to walk around objects such as a cube in order to get to the player instead of walking straigh towards to the player.

currenlty i have used the point object command which simply points the object (enemy) and the player and moves until it reaches the player. although if there was a wall (or cube) in the way any ideas of how i could get the enemy to move around it?

thanks
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 13th Apr 2004 22:36
There are many techniques you can try. The most popular one is called A* (A star.) You can also use a simple look forward and turn code. It depends on the kind of level and obstacles you have. A twisty maze needs A* or way points. A forest of trees or rocks only needs simple obstacle avoidance logic.
--
TAZ

Dr Crazy
20
Years of Service
User Offline
Joined: 13th Apr 2004
Location:
Posted: 13th Apr 2004 23:03
Hey! I'll probably need that sometime in my First person shooter game (SAS Elite). DO you think you could right a code so the enemies walk around obstacles and not straight to the player?
Cheers,
Nick.

Who dares; wins.
muscles
20
Years of Service
User Offline
Joined: 12th Apr 2004
Location:
Posted: 14th Apr 2004 00:52
check out the last monster hunts tutorial. it has a decent AI algorithm for simple object collision detection/avoidance
Social Disease
20
Years of Service
User Offline
Joined: 30th Sep 2003
Location: State of Confusion, beyond Denial...
Posted: 14th Apr 2004 21:16
Quote: "The most popular one is called A* (A star.) "

Ok, so what is A*? Can you go a bit more in depth Zircher?

Think Gad fro Spill Chock!
bigbrother 2000
20
Years of Service
User Offline
Joined: 15th Oct 2003
Location: UK
Posted: 15th Apr 2004 02:45
is this possible in dark basic pro? lol
bigbrother 2000
20
Years of Service
User Offline
Joined: 15th Oct 2003
Location: UK
Posted: 16th Apr 2004 15:08

Login to post a reply

Server time is: 2024-09-22 05:57:00
Your offset time is: 2024-09-22 05:57:00