Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]

Author Topic: Staircase fortress?  (Read 1578 times)

thedryness

  • Bay Watcher
    • View Profile
Re: Staircase fortress?
« Reply #15 on: June 24, 2011, 08:17:24 pm »

yup, as far as i can tell, the FPS in my base was either unaffected or only affected slightly. i did have a bit of a decrease (70ish -> 60ish) but i think that mostly happened because i fought off two forces of darkness without cleaning up the mess afterward.
Logged

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Staircase fortress?
« Reply #16 on: June 24, 2011, 08:37:22 pm »

...The way I see it, this is highly efficient for walking distance but extremely inefficient for the pathfinding algorithm as every direction possible now needs to be explored in the calculations.
Not exactly true, see below.

My understanding is that DF uses A* for it's pathfinding, and thus an increase in the number of available paths does not affect fps, while false paths that go directly towards the destination and than dead end are murderous, so staircases would be very good for fps.  I haven't tested it, though.
Correct, there was a quote from Toady once that confirmed the use of a modified A*. Also correct that dead end tunnels kill fps - walling off old mining tunnels will save fps.

However, in d_init.txt there is this line:
Code: [Select]
[PATH_COST:1:2:5:25]The normal pathing cost is 2, so A* will check in the "wrong" directions normally. If you make a staircase fort, either change that line to:
Code: [Select]
[PATH_COST:1:1:5:25]or paint your entire staircase zone as a high-traffic area. It will save fps if you have a large number of pathfinders.

If the pathing cost is 1, the pathfinding algorithm first looks only at the straight-line path, regardless of the number of optional paths. The reason the default normal path cost is 2 is so you can designate high-traffic paths for your dwarves.

EDIT:path cost value
« Last Edit: June 24, 2011, 08:44:21 pm by Urist Da Vinci »
Logged

kotekzot

  • Bay Watcher
    • View Profile
Re: Staircase fortress?
« Reply #17 on: June 24, 2011, 08:41:27 pm »

Your two PATH_COST strings are the same. I assume you meant to write [PATH_COST:1:1:5:25]?
Logged
Dwarf Fortress: Where violent death is a renewable resource
Bro, your like... thinking like a square man... its like, the WHOLE lamprey is just like, one big NECK dude, you know? its like hahahaha! dude protect the trees though, seriously. *inhale*... anyways... you like, want this dead black bear, bro?
Pages: 1 [2]