Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Pathfinding utility?  (Read 795 times)

PopTart

  • Bay Watcher
    • View Profile
Pathfinding utility?
« on: January 17, 2016, 05:22:19 pm »

Is anyone working on a utility that queries where all the paths are being calculated? Maybe prints out the z-levels that are hogging all the FPS?

This is my first post, so I'll use this space to say what an amazing community of gamers this is!

MoonyTheHuman

  • Bay Watcher
  • I think the DEC VAX hates me.
    • View Profile
    • hellomouse
Re: Pathfinding utility?
« Reply #1 on: January 17, 2016, 06:23:27 pm »

Is anyone working on a utility that queries where all the paths are being calculated? Maybe prints out the z-levels that are hogging all the FPS?
Not that i know of

PopTart

  • Bay Watcher
    • View Profile
Re: Pathfinding utility?
« Reply #2 on: January 17, 2016, 07:40:22 pm »

Are there clever ways of monitoring dwarf and beast movement and behavior to deduce pathfinding problems?

MoonyTheHuman

  • Bay Watcher
  • I think the DEC VAX hates me.
    • View Profile
    • hellomouse
Re: Pathfinding utility?
« Reply #3 on: January 17, 2016, 07:44:11 pm »

Are there clever ways of monitoring dwarf and beast movement and behavior to deduce pathfinding problems?
yet again, not that i know of, for now, deal with the FPS death until Toady decides to add threading to DF

Diamond

  • Bay Watcher
  • Did someone just say "elves" ?
    • View Profile
Re: Pathfinding utility?
« Reply #4 on: January 17, 2016, 07:55:22 pm »

There are no such utilities that I heard of.
But, there is always traffic designations menu if you really want to do some research, d -> o, if I remember correctly. It can help increase the speed of pathfinding, remove certain areas from calculations, and can potentially be used to re-route dwarves.
It's of limited use, though, if you properly plan your fortress, like using 1-2 tile corridors, ramps instead of stairs, walling off caverns and open areas, cutting off access to above ground areas and such. This things kill FPS.
Logged

Salmeuk

  • Bay Watcher
    • View Profile
Re: Pathfinding utility?
« Reply #5 on: January 17, 2016, 10:50:10 pm »

If you are curious, there are a few threads that have science-ed the pathfinding to figure out what causes the most lag. I can't repeat what they said, and am too lazy to search them up for you (I'm really helpful, I know), but after reading through those I had a pretty good sense of how to design for FPS / common pitfalls that drop it. Your best bet is simply to play with fewer dwarfs, but that's no fun (er, it can be, but the game really changes at higher population levels).

The biggest tip I know is to keep your fortress as three-dimensionally compact as possible: fewer z-levels closer together, with smaller, tightly-packed rooms that avoid storage sprawl. A good way to test in game is to have a lot of idle dwarfs, then designate a bunch of things to dump from across the fortress. Depending on your setup, track the dwarf activity and relative FPS loss as they path through your hallways and staircases.
Logged

PopTart

  • Bay Watcher
    • View Profile
Re: Pathfinding utility?
« Reply #6 on: January 18, 2016, 12:11:42 am »

Thanks for the comments about increasing FPS. My question has more to do with observing the dwarfs' behavior to track their pathing, which none of the threads discuss, at least that I have found.

greycat

  • Bay Watcher
    • View Profile
Re: Pathfinding utility?
« Reply #7 on: January 18, 2016, 11:41:16 am »

You can follow one dwarf at a time.  The "camera" focuses on that dwarf until you hotkey to somewhere else.

That said, I'm not really sure what you're asking for.  We already know which path the dwarf will end up taking.  The part that matters for performance is what paths the game thought about taking, but didn't.
Logged
Hell, if nobody's suffocated because of it, it hardly counts as a bug! -- StLeibowitz

gestahl

  • Bay Watcher
    • View Profile
Re: Pathfinding utility?
« Reply #8 on: January 18, 2016, 06:10:24 pm »

Someone that knows better will likely come by at some point, but I belive it's A* pathing.

Anyway, wall off unused sections (with or without vampire bookkeeper) and try to keep things compact. Shared and/or quantum stockpiles help. Ramps vs stairs don't seem like they should make more than a one tile movement difference, BUT using ramps seems to help more than that. Livestock/pet pathing may or may not still be broken, wall up or cage animals you aren't killing.

Other than that as long as you don't drain the ocean to make a mermaid farm you'll be ok
Logged
Cultural assimilation through conquest.
Sure, got a few unburied corpses lying around