Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411574 Posts in 69386 Topics- by 58444 Members - Latest Member: darkcitien

May 04, 2024, 05:08:48 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Wandering Behaviors using a Pathfinder
Pages: [1]
Print
Author Topic: Wandering Behaviors using a Pathfinder  (Read 814 times)
skatterbean
Level 0
*



View Profile
« on: March 12, 2010, 02:04:38 PM »

I want to build a wandering/patrol behavior for my AI units but I'm unsure of how to build this behavior using a pathfinder. My pathfinder is a standard A* pather with underlying grid nodes. The routes need to be computed procedurally as my map is created differently everytime. My map is populated with irregularly shaped obstacles and these are represented in the underlying MapGrid shown here:

Black areas are impassable, red are partially open and white is open.

I've got some ideas but wanted to ask the community, how would you implement random patrol routes that look believable? (i.e. closed loops around large obstacles)

Also links to any resources would be appreciated. Thanks!
« Last Edit: March 12, 2010, 02:15:57 PM by skatterbean » Logged
st33d
Guest
« Reply #1 on: March 13, 2010, 02:45:09 AM »

I posted a thread about making grid based lightning:

http://forums.tigsource.com/index.php?topic=10599.0

My solution was to use a greedy search with random deviations:

http://www.robotacid.com/flash/red_rogue/lightning/

You could introduce into your A* routine some forced errors. Or change it to a simpler search that A* and let the random deviation take the route around the obstacles.

I think a broken A* with some forced deviation would begin to look organic if you do it right.
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic