Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: The long way  (Read 534 times)

Dotto

  • Bay Watcher
    • View Profile
The long way
« on: October 19, 2009, 01:14:47 am »

Is it common problems with pathfiding? Sometimes my dwarves take an absurd long way, when there was plenty of space to take a shorter one, much shorter. Thanks.
Logged

Time Kitten

  • Bay Watcher
  • Evil Spirit
    • View Profile
Re: The long way
« Reply #1 on: October 19, 2009, 02:57:13 am »

Traffic designations, wide smoothed then block paved roads to anywhere need be going, then wall off all inefficient paths.
Logged

Magua

  • Bay Watcher
    • View Profile
Re: The long way
« Reply #2 on: October 19, 2009, 10:09:20 am »

Dwarves see other creatures as obstacles, and will only path through eachother when there's no other way to get to their destination.  Otherwise, they'll take absurdly long routes in order to avoid having to look their neighbors in the eye after last night's party at the *Iron Statue*. 

If they pathed and then run into someone while on the path (who wasn't there before), they may doubleback to take an absurdly long route.

Moral of the story: 3-tile wide corridors are your friend.
Logged
Also, you can manufacture vomit at a smelter.  Subsequently removing the smelter spews vomit over a surprising area.

Derakon

  • Bay Watcher
    • View Profile
Re: The long way
« Reply #3 on: October 19, 2009, 10:40:58 am »

Roads, and smoothing, do nothing for travel speed. They're just an aesthetic improvement. Well, on the surface, roads prevent trees from growing and blocking a path, but that's all they do of any utility mechanics-wise.

As Magua noted, dwarves will try to route around each other. Another weird thing they do is, when they pick a job that requires an arbitrary input (e.g. any unused stone is valid for a mechanic's Construct Mechanism job), they pick the closest stone as the mole digs, not as the dwarf walks. If the closest stone is 8 z-levels away and 0 tiles distant in X and Y, then they'll travel aaaall the way down to that 8th level, which likely involves quite a lot of X and Y travel. Never mind that the actual closest stone was 9 squares away in X and Y.
Logged
Jetblade - an open-source Metroid/Castlevania game with procedurally-generated levels

Dotto

  • Bay Watcher
    • View Profile
Re: The long way
« Reply #4 on: October 19, 2009, 09:12:59 pm »

Dwarves see other creatures as obstacles, and will only path through eachother when there's no other way to get to their destination.  Otherwise, they'll take absurdly long routes in order to avoid having to look their neighbors in the eye after last night's party at the *Iron Statue*. 

If they pathed and then run into someone while on the path (who wasn't there before), they may doubleback to take an absurdly long route.

Moral of the story: 3-tile wide corridors are your friend.

That or less alcohol in Iron Statue´s Party. Thanks.

As Magua noted, dwarves will try to route around each other. Another weird thing they do is, when they pick a job that requires an arbitrary input (e.g. any unused stone is valid for a mechanic's Construct Mechanism job), they pick the closest stone as the mole digs, not as the dwarf walks. If the closest stone is 8 z-levels away and 0 tiles distant in X and Y, then they'll travel aaaall the way down to that 8th level, which likely involves quite a lot of X and Y travel. Never mind that the actual closest stone was 9 squares away in X and Y.

Maybe that´s the one thing that piss me off the most in DF. This 0 x-distance maybe be a hell of a longer path. Thanks.
Logged