Bay 12 Games Forum

Please login or register.

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

Author Topic: FPS !!Science!! - Pathfinding [picture heavy]  (Read 5141 times)

utunnels

  • Bay Watcher
  • Axedwarf
    • View Profile
Re: FPS !!Science!! - Pathfinding [picture heavy]
« Reply #15 on: December 03, 2014, 02:53:23 am »

(or lowering the "normal" cost from 2 to 1).
Will that work if I change the value now or do I have to start a new game?



Well, no effect. I changed the value and the game still ran at around 11-12fps, give or take.
« Last Edit: December 03, 2014, 03:57:37 am by utunnels »
Logged
The troglodyte head shakes The Troglodyte around by the head, tearing apart the head's muscle!

Risen Asteshdakas, Ghostly Recruit has risen and is haunting the fortress!

Col_Jessep

  • Bay Watcher
  • ♦ Cat Herder
    • View Profile
Re: FPS !!Science!! - Pathfinding [picture heavy]
« Reply #16 on: December 03, 2014, 05:00:09 am »

I would try a couple of things:
+ atom-smash all junk (refuse, thread from butchering...)
+ sell things that aren't directly beneficial (crafts, surplus food, cloth, seeds...)
+ lock all animals into their own rooms if possible (dogs, pigs...)
+ wall off areas you no longer need access to (mines, unused workshop areas, caverns...)
+ forbid items you don't need anytime soon (misc. metal bars, surplus wood, stone...)

I'm not gonna lie, it won't do much. Once your FPS go down it's very hard to bring them back up. But if you want to try anyway you can use DFhack tools to make the process bearable. Maybe you can start by butchering some animals. Go into your stock menu and mark all trash for dumping. Remains, corpses, cartridge, shells, thread... All those things that accumulate in the hundreds over the years. Keep a couple for moods, use DFhacks "autodump" to smash the rest.

Next dump all the surplus stuff you have and lock it away. You can use "cleanowned scattered" and "clean all item" to dump scattered sloths and clean the map from bloodspatter, leaves, vomit, dirt...

Areas like your mined-out workshop level, the caverns and the surface can cause some slowdown if they are open. So pull up the bridges and lock the doors.

It's best to do all these things on a regular basis when you have some idle haulers. In my old fort I atom-smashed everything I didn't need and kept the place lean and mean. That fort went to 17 years and was still playable. Limiting your dofs to 100 would be another great way to keep FPS up. That's enough to get proper invasions and everything but it's not quite as hard on the FPS. You won't get the mountainhome with 100 dwarfs though afaik.

Good luck!
Logged
Just kids...
Spoiler (click to show/hide)

Col_Jessep

  • Bay Watcher
  • ♦ Cat Herder
    • View Profile
Re: FPS !!Science!! - Pathfinding [picture heavy]
« Reply #17 on: December 03, 2014, 05:18:50 am »

I tested my current fort by painting high/restricted areas and that didn't make a difference at all.
The game ran at 13 fps on my current computer (when all dorfs were moving to a burrow, it dropped to 10).
The thing about burrows is that you add another layer of checks to every job. I think that's only worth it in extreme cases (magma forges). It might be better to put bedrooms and another dining hall down there and seal the area off until you need to access the armor and weapons.
(or lowering the "normal" cost from 2 to 1).
Will that work if I change the value now or do I have to start a new game?
You can paint the entire map as high traffic after embarking. Changing the values has to happen before you generate the world I think. (The traffic values are stored in the save but nobody seems to know where exactly.)
Logged
Just kids...
Spoiler (click to show/hide)

Psieye

  • Bay Watcher
    • View Profile
Re: FPS !!Science!! - Pathfinding [picture heavy]
« Reply #18 on: December 03, 2014, 05:28:11 am »

From my prior experiments on FPS, stockpiles were a significant contribution to FPS grind. I can't say it makes pathfinding woes tiny in comparison but nobody seems to mention it when thinking about optimising FPS.
(or lowering the "normal" cost from 2 to 1).
Will that work if I change the value now or do I have to start a new game?
You can paint the entire map as high traffic after embarking. Changing the values has to happen before you generate the world I think. (The traffic values are stored in the save but nobody seems to know where exactly.)
[/quote]As I recall, there are 2 sets of values: the default that you see in the config and what your save is actually using. The latter can be changed in-game without re-rolling the world.
Logged
Military Training EXP Analysis
Congrats, Psieye. This is the first time I've seen a derailed thread get put back on the rails.

utunnels

  • Bay Watcher
  • Axedwarf
    • View Profile
Re: FPS !!Science!! - Pathfinding [picture heavy]
« Reply #19 on: December 03, 2014, 07:37:34 am »

Yeah, I tried on another computer. I painted all map high traffic. (d-o-h; enter; drag the cursor to the upper left corner, < all the way to level 148; then move the cursor to the lower right corner, > all the way to level -29; enter)
This time fps changed from roughly 10 to solid 11 (I loaded from the same save file).

So perhaps the bottleneck was something else.

Now my dorfs are killing each other, so hopefully I'll end up with fewer dorfs.



Edit*

I autodumped all worn clothes (more than 1600) and now I get around 12 fps.
« Last Edit: December 03, 2014, 07:49:06 am by utunnels »
Logged
The troglodyte head shakes The Troglodyte around by the head, tearing apart the head's muscle!

Risen Asteshdakas, Ghostly Recruit has risen and is haunting the fortress!

taptap

  • Bay Watcher
    • View Profile
Re: FPS !!Science!! - Pathfinding [picture heavy]
« Reply #20 on: December 03, 2014, 08:05:59 am »

I have my doubts about the proposed open designs. Why is everyone considering caverns problematic when open design is suddenly so great? (It should be easy enough to test, take one of your old fortresses and radically tear down the internal walls.) In a 3D fortress the proposed large open areas may work just like large unconnected rooms along a corridor unless a lot of vertical connections are added as well. Imagine vertical hauling searching all your floors to find a way to the trade depot. Also, when an obstacle is in front of a pathing target the number of operations increases the faster the more open the area along the path is. Reducing obstacles in front of targets is all great, but wouldn't you want to limit the rate at which operations increase when inevitably some obstacles remain?

Col_Jessep

  • Bay Watcher
  • ♦ Cat Herder
    • View Profile
Re: FPS !!Science!! - Pathfinding [picture heavy]
« Reply #21 on: December 03, 2014, 12:09:09 pm »

Why is everyone considering caverns problematic when open design is suddenly so great?
The reason the caverns add lag is that cave grass starts growing everywhere, you increase the area that is checked for hauling jobs significantly, an often considerable amount of refuse needs to be processed, dwarfs start hauling spider nets, look for water or fish, haul wood, groups of critters try to path into your fort...

That is why testing this stuff in DF is so difficult. You can rarely isolate a factor of significant impact without influencing other things. Did the FPS hit come from the additional pathfinding solutions or because cave grass starts growing everywhere? What has a bigger impact? How big is the impact of dead shrubs and saplings that linger on the map? How expensive is it to path through a labyrinthian cavern with several levels and trees? I don't know! And it drives me nuts!  :D

All we can do is to optimize what we can and make reasonable assumptions based on what little we do know.
I will try to knock down all the walls in my last fort and see how that goes though. Thanks for the idea!

PS: A vile force of darkness has arrived!
There go all my hopes for a conclusive test result. Feck!
« Last Edit: December 03, 2014, 02:07:56 pm by Col_Jessep »
Logged
Just kids...
Spoiler (click to show/hide)

utunnels

  • Bay Watcher
  • Axedwarf
    • View Profile
Re: FPS !!Science!! - Pathfinding [picture heavy]
« Reply #22 on: December 03, 2014, 07:27:06 pm »

And it seems once the underground sea is disturbed, it never stops flowing.
I once built a water fall which used the sea as a sink. Even though I removed the water fall, the water was still flowing and rippling.

Or was it just the nature of the underground sea that it never went quiet? I didn't recall.
Logged
The troglodyte head shakes The Troglodyte around by the head, tearing apart the head's muscle!

Risen Asteshdakas, Ghostly Recruit has risen and is haunting the fortress!

taptap

  • Bay Watcher
    • View Profile
Re: FPS !!Science!! - Pathfinding [picture heavy]
« Reply #23 on: December 04, 2014, 03:58:07 am »

Illustrations to my last post. https://imgur.com/EDwqmNP,4691XnD,CtMSMr7

Operations: 1) Wall at start 101, 2) wall at target 192, 3) wall at target but circumscribed start 72.

This is A* and Manhattan distance to compare with the other experiments in the thread, even if that isn't the heuristic used in DF.
« Last Edit: December 04, 2014, 04:04:14 am by taptap »
Logged

Di

  • Bay Watcher
    • View Profile
Re: FPS !!Science!! - Pathfinding [picture heavy]
« Reply #24 on: December 04, 2014, 05:40:55 pm »

And it seems once the underground sea is disturbed, it never stops flowing.
It will eventually. You can even end up with stable 5/7 surrounded with 7/7's.
The magma sea won't. Non-full tiles there will keep moving around until they hit the edge. That's why I usually pump magma near the highest connection to the off-map portion of it.
Logged
Quote from: Creamcorn
Dwarf Fortress: Where you meet the limit of your imagination, moral compass, sanity and CPU processor.
http://www.bay12forums.com/smf/index.php?topic=103080.0 Fix sober vampires!
http://www.bay12forums.com/smf/index.php?topic=91442.0 Dwarven Cognitive Science

Rogue Yun

  • Bay Watcher
  • Beware of the Carp
    • View Profile
Re: FPS !!Science!! - Pathfinding [picture heavy]
« Reply #25 on: December 04, 2014, 06:48:41 pm »

There is some useful information on pathfinding here as well:
http://www.bay12forums.com/smf/index.php?action=post;quote=1210898;topic=56041.0

When it comes to 3D, the author of that thread suggests this:
Quote
For 3d this means that every tile of your fort should be a stair, this does not only produce the shortest path between all two tiles (ignoring ramps for a moment), but it will also lead to the fastest pathfinding solutions. Of course this is not possible, but you can have a lot of stairs at least.
Logged

.:Simple Mood 16x16 ASCII:.
Keep it Simple. Keep it Safe.
Pages: 1 [2]