View topic - Is there any way for map/mod makers to assist pathfinding?



All times are UTC + 1 hour


Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: 17 Oct 2011, 02:35 

Joined: 21 Oct 2008, 01:54
Or is this can only be obtain on the engine side?


Top
 Offline Profile  
 
PostPosted: 17 Oct 2011, 03:35 
User avatar

Joined: 28 Jul 2008, 05:51
Location: Australia
I'd say avoid narrow passes. Regardless of the quality of pathfinding you can only fit a certain number of units per second through any specific gap which means any excess units have to queue behind which leads to them turning around to find a new route and bouncing off other units. It's even worse if friendly units are trying to enter the gap from both sides. Since there is no code to say "stand aside and let the larger group pass" it means a single unit can block an entire army. You'd also want to avoid crossroads where columns of friendly units would regularly cross paths. Once again the code does not allow either group to wait for the other so the result is the groups entangle in the intersection.

Having said that, there are features in the engine like "heatmapping" which provide hints as to whether an area is "busy". Still, I wouldn't rely on that (especially since it can be turned off).


Top
 Offline Profile  
 
PostPosted: 17 Oct 2011, 03:50 

Joined: 21 Oct 2008, 01:54
What about the units who have different speeds? I keep finding that the fast one somehow gets stuck behind the group of fast ones.


Top
 Offline Profile  
 
PostPosted: 17 Oct 2011, 09:09 

Joined: 09 Sep 2007, 20:05
Another thing I have learned is that however realistic adding some perlin noise to your "flat" areas is, it ruins pathing majorly. Try to keep all playable surfaces free of any high or mid frequency noise. A trick you can do is have 2 heightmaps, one that you use to render the texture (this can have all the noise you want) and one that is the ingame heightmap (strictly smooth surfaces).


Top
 Offline Profile  
 
PostPosted: 17 Oct 2011, 11:15 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
ingame select a unit and press F2. (i think first you have to type /cheat /globallos to see whole map)
Ideally passable (green) and unpassable areas (red) have clear borders.
If there are stray, noisy red fields or narrow green fields, pathing will become more problematic.


Top
 Offline Profile  
 
PostPosted: 17 Oct 2011, 11:38 
Spring Developer

Joined: 16 Dec 2006, 20:59
There is Lua pathfinding ofc, but in general I would say it is too slow. In the future we may have different engine-side pathfinders to choose from, because the interface is now clean enough to allow that.


Top
 Offline Profile  
 
PostPosted: 17 Oct 2011, 11:54 
User avatar

Joined: 30 Nov 2008, 04:31
Location: the flow
Quote:
There is Lua pathfinding ofc

How slow is that slow? And can it delegate to engine?


Top
 Offline Profile  
 
PostPosted: 17 Oct 2011, 12:18 
Moderator

Joined: 12 Oct 2007, 08:24
There is some simple mod stuff.

Make sure your units are as big as they think they are with equal entries for footprint in movedefs and unitfefs.

Avoid large turn radius or low accelerations unless required.


Top
 Offline Profile  
 
PostPosted: 17 Oct 2011, 19:52 
Community Representative
User avatar

Joined: 08 Sep 2008, 21:59
Location: small cars
make "flats" of maps completely flat

make "ramps" completely evenly graded with an even slope width throughout

make "cliff edges" an even slope throughout

frozen fortress paths near-perfectly, this was not by accident... just takes a fair amount of planning and testing


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.