31
DF Dwarf Mode Discussion / Re: Optimum layout ideas
« on: October 13, 2015, 07:23:24 pm »Ramps seem like they'd be more complex for the pathing algorithm. A fortress of stairs should be a straight line to any point on any level.
All I know is that my FPS is consistently higher than in the ramp-based forts than it was in the staircase-based forts. I think it gives more flexibility for the dwarves to dodge one another as they are descending or ascending.
I'm willing to believe that ramps can help with fps, but not for the reason that you think they do. I'm assuming we're talking about 3-wide ramps that make 90-degree turns each z-level vs. 3x3 vertical stairwells here.
On the ramp, if a dwarf is on a collision course with another dwarf going the other way, he only has 1-2 options (depending on if he was in the middle or on an edge to begin with) for which way to move aside so they can pass each other faster; in fact, this will likely be just 1, since the pathing should make them all stick to the inner edge of the ramp, so they'll nearly always just move 1 tile outwards from the center of the spiral until they can pass each other. Moving 2 tiles outward is pointless, although the pathing algorithm will probably check for that as well.
Compare that to a 3x3 stairwell, where a dwarf in the middle tile has 8 directions to choose from, and even a dwarf entering and leaving the stairwell from the same edge on both his "entry" and "exit" z-levels, e.g. on one of the 3 right-hand tiles, has 5 tiles to choose from that are equally good, and even in the best case of a dwarf entering and leaving the corridor from the same corner tile, they still have 3 tiles to move aside to (assuming diagonal movement is the same cost as orthogonal, which I'm not entirely sure is true). Likewise in a 2x2 stairwell dwarves always have 3 directions to move aside to to choose from.
So it would actually be that the dwarves traveling along a spiral ramp have less flexibility with regards to choosing their path, but this may be more efficient computationally, since there are less options to consider.