Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Video - How to keep your fort running fast / How to avoid FPS death  (Read 2392 times)

TheEqualsE

  • Bay Watcher
    • View Profile

I recently got a bunch of advice for keeping my fort running its fastest.  I combined that with my own experience and came up with this:

https://youtu.be/Epha69YpwzY

Logged
Likes cats for their aloofness.

Pvt. Pirate

  • Bay Watcher
  • Dabbling Linux User
    • View Profile
Re: Video - How to keep your fort running fast / How to avoid FPS death
« Reply #1 on: June 03, 2019, 04:34:11 am »

"keep the fort in one embark square" absolutely!
i usually was afraid of breaking to the caverns too early and kept my fort on 1-2 z levels + defences above and it didn't work as great:
1. the dorfs took way too long for hauling anything though the long corridors
2. i got way too few different minerals
3. pathing took up many fps

now i switched to a system that is able to mine complete layers while keeping it close to a central stairway.
Spoiler (click to show/hide)
i mine a central 4x4 stairway with 4 wide corridors 11x11 rooms with 2 thick walls for engraving.
i can expand those to have a cluster of 4 such rooms in each corner of the staircase surrounded by a 2 wide corridor and then add rooms around that aswell if needed.
the four rooms around the staircase can also easily be transformed into a meeting hall fit for a god.
i'll make screenshots later. screenshot added.
11x11 is absolutely the best for creating anything:
- a bedroomcluster of 10 rooms
- a quarantine hospital with 3 rooms (1 for table and 2 for beds) (adding 4 of those together for a big hospital with a huge cloth stockpile in the center)
- a dormitory for a shitload of beds
- workshop rooms with lockable cubicles for each workshop and a qsp in the center
- closter of noble rooms
- great hall with two rows of tables (40 seats in total)
« Last Edit: June 03, 2019, 09:26:00 am by Pvt. Pirate »
Logged
"dwarves are by definition alcohol powered parasitic beards, which will cling to small caveadapt humanoids." (Chaia)

anewaname

  • Bay Watcher
  • The mattock... My choice for problem solving.
    • View Profile
Re: Video - How to keep your fort running fast / How to avoid FPS death
« Reply #2 on: June 03, 2019, 07:36:09 pm »

When I mine out layers, after the stone has been hauled away, I build a wall around the stairs, so that the empty room is sealed off, and will not be used during pathfinding calculations.
Logged
How did I manage to successfully apply the lessons of The Screwtape Letters to my perceptions of big grocery stores?

Sarmatian123

  • Bay Watcher
    • View Profile
Re: Video - How to keep your fort running fast / How to avoid FPS death
« Reply #3 on: June 05, 2019, 06:19:06 am »

Walls are main hit on fps due pathing.

Having a bunker on surface with one tight 3x1 entrance is ok. Having one 3x3 entrance to underground from it is ok too, specially if you take your time to smooth (no fps death due some invisible vermin overpopulation) walls and floor and wall off unused smaller corridors extending from it. Problem inside of the bunker are the walls for the rooms. The only rooms, which need walls are... pastures. The walls keep animals from straying off and from wandering off. Animals don't do that through doors (or maybe i banned animal passing? i don't remember. Cats need entrance to de-verminize it so I guess I open for animals too). Other notable room in need of walls is the corpse stockpile. Sight of a corpse is enough to drive dwarves psycho. Even worse is to dump corpse into corpse stockpile, even if there is no possibility to get burial places for some corpses, like visiting human diplomat corpse (distress->insanity->dehydration death, because was staying too long? lol) for example. So no need for walls for any other walls really. However, even if all other rooms are missing walls, then the floor/roof becomes another wall fps issue for path finding. I found useful to remake all main corridors inside of bunker into stairs between floors. That lowered fps hit from pathing significantly and dwarves got shorter distances to walk too.

This walless fortress design (even on a surface bunker fortress) is a huge relief on fps burden. For me it was 20% faster DF running speed. As much improvement, as all last patches Toady did to speed DF up.
Logged

Pvt. Pirate

  • Bay Watcher
  • Dabbling Linux User
    • View Profile
Re: Video - How to keep your fort running fast / How to avoid FPS death
« Reply #4 on: June 05, 2019, 07:12:28 am »

workshops for moodable skills need to have walls to prevent a catastrophy!
Logged
"dwarves are by definition alcohol powered parasitic beards, which will cling to small caveadapt humanoids." (Chaia)

TheEqualsE

  • Bay Watcher
    • View Profile
Re: Video - How to keep your fort running fast / How to avoid FPS death
« Reply #5 on: June 05, 2019, 02:27:03 pm »

workshops for moodable skills need to have walls to prevent a catastrophy!

Well, here's the thing with that.  If you limit the types of metals your fort makes to only what it has, and always have a few around, your dwarves will never ask for a metal you don't have.  We have plenty of wood so no problem there.  At the start of my embarks i usually bring two of each kind of string so it can made into any needed type of cloth.  After that the only rare thing i know of is shells, and swampcavern having both a stream and ponds there were no shortage of pond turtle shells.  I even stock piled a few on purpose to make sure they never got accidentally thrown away.

If you have all those, so far as I'm aware, you will never lose a moodable dwarf.  I mean, I still did, but only because I wasn't paying attention and whatever they wanted was too far away.  I figure one in 25 years is acceptable.
Logged
Likes cats for their aloofness.

TheEqualsE

  • Bay Watcher
    • View Profile
Re: Video - How to keep your fort running fast / How to avoid FPS death
« Reply #6 on: June 05, 2019, 02:27:47 pm »

Umm forgot to mention that the wall less fort sounds like a really cool idea.  I always wondered about that but never tried it.
Logged
Likes cats for their aloofness.

Pvt. Pirate

  • Bay Watcher
  • Dabbling Linux User
    • View Profile
Re: Video - How to keep your fort running fast / How to avoid FPS death
« Reply #7 on: June 06, 2019, 07:55:16 am »

the mood dwarfs are a risk i cannot take.
Logged
"dwarves are by definition alcohol powered parasitic beards, which will cling to small caveadapt humanoids." (Chaia)

Sarmatian123

  • Bay Watcher
    • View Profile
Re: Video - How to keep your fort running fast / How to avoid FPS death
« Reply #8 on: June 06, 2019, 02:13:54 pm »

the mood dwarfs are a risk i cannot take.

You could leave 1 empty tile all around workshop and if it is claimed by a moody dwarf with impossible material demands... Just deconstruct tiles around in 2 phases (so no adjacent floor tile is deconstructed in the same time) and construct walls in their places. Just make sure no dwarves get closed in those walls together with the moody one. :D

Same thing with waredwarves and vampires, but those I would station in solitary squads outside in some shallow holes covered with bridges. To help with sieges maybe? :D
Logged

Pvt. Pirate

  • Bay Watcher
  • Dabbling Linux User
    • View Profile
Re: Video - How to keep your fort running fast / How to avoid FPS death
« Reply #9 on: June 11, 2019, 06:31:10 am »

the mood dwarfs are a risk i cannot take.

You could leave 1 empty tile all around workshop and if it is claimed by a moody dwarf with impossible material demands... Just deconstruct tiles around in 2 phases (so no adjacent floor tile is deconstructed in the same time) and construct walls in their places. Just make sure no dwarves get closed in those walls together with the moody one. :D

Same thing with waredwarves and vampires, but those I would station in solitary squads outside in some shallow holes covered with bridges. To help with sieges maybe? :D
constructions ususally take too long (unpredictable how long actually) once shit hits the fan, so i'd never rely on those either.
i usually have a quarantine hospital with fortifications for each bed in its 7 tiles long room (no dropped bucket etc can block the door from closing), so up to 7 dwarves could take them down at once.
Logged
"dwarves are by definition alcohol powered parasitic beards, which will cling to small caveadapt humanoids." (Chaia)

Schmaven

  • Bay Watcher
  • Abiding
    • View Profile
Re: Video - How to keep your fort running fast / How to avoid FPS death
« Reply #10 on: June 16, 2019, 08:15:39 am »

Great video!  That's really interesting how crundles stuck atop subterranean trees caused such big fps hits.  Embark location seems to have the biggest effect due to trees and critters.  Reanimating biomes seems to have a huge impact in improving FPS by way of zombie explosions.  Caverns do the same in time.  Rumor has it the flora and fauna don't start up until they are actually breached though, so that's controllable.  They can be limited or even disabled in advanced world gen. 

Let's suppose for a moment that someone rushed straight in to FPS death by doing the opposite of all those tips.  To what extent do you think it's possible to resurrect such a fort?  Certain happenings are irreversible, such as world events and choice of embark spot; But de-foresting, de-cluttering, and de-crittering are all options.  As well as the pathfinding barriers, limiting dwarf population, and disabling mechanical  / fluid projects.  It stands to reason that which aspect to address first depends on the particular setup of the fort, and to what extent each is causing a drain. 

Using DFHack, 'cleanowned', 'cleanconst', and 'clean all' increased FPS from 11 to 13.  Not huge in FPS numbers, but by percentage, nearly a 20% improvement.

Edit:  It turns out that undiscovered portions of caverns may have 1000+ units not displayed in the unit list.  Widdeling the count down to 150 returned FPS to normal fresh embark speeds.  Based on this, I would recommend not breaching the caverns until you are prepared to manage the cavern critter population in some way.  It's less of an issue in regular biomes as compared to reanimating ones.
« Last Edit: June 18, 2019, 11:56:06 am by Schmaven »
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Video - How to keep your fort running fast / How to avoid FPS death
« Reply #11 on: June 18, 2019, 03:27:25 pm »

As you accidentally noted, the actions can absolutely go on in unrevealed parts of the map.

This means that, yes, you can get zombie hordes without having ever revealed caverns, and have that drain your fps.

Therefore, the solution in reanimating biomes in particular is not to ignore them (the fps will just get worse) but claim control of them ASAP.

TheEqualsE

  • Bay Watcher
    • View Profile
Re: Video - How to keep your fort running fast / How to avoid FPS death
« Reply #12 on: June 26, 2019, 07:13:36 pm »

Great video!  That's really interesting how crundles stuck atop subterranean trees caused such big fps hits.  Embark location seems to have the biggest effect due to trees and critters.  Reanimating biomes seems to have a huge impact in improving FPS by way of zombie explosions.  Caverns do the same in time.  Rumor has it the flora and fauna don't start up until they are actually breached though, so that's controllable.  They can be limited or even disabled in advanced world gen. 

Let's suppose for a moment that someone rushed straight in to FPS death by doing the opposite of all those tips.  To what extent do you think it's possible to resurrect such a fort?  Certain happenings are irreversible, such as world events and choice of embark spot; But de-foresting, de-cluttering, and de-crittering are all options.  As well as the pathfinding barriers, limiting dwarf population, and disabling mechanical  / fluid projects.  It stands to reason that which aspect to address first depends on the particular setup of the fort, and to what extent each is causing a drain. 

Using DFHack, 'cleanowned', 'cleanconst', and 'clean all' increased FPS from 11 to 13.  Not huge in FPS numbers, but by percentage, nearly a 20% improvement.

Edit:  It turns out that undiscovered portions of caverns may have 1000+ units not displayed in the unit list.  Widdeling the count down to 150 returned FPS to normal fresh embark speeds.  Based on this, I would recommend not breaching the caverns until you are prepared to manage the cavern critter population in some way.  It's less of an issue in regular biomes as compared to reanimating ones.

Thanks!  I want to address that point about bringing back a fort that's basically dead.  It's totally do-able.  I've done it.  I mean, not Swampcavern, but before.  For most players it would mean bringing the number of creatures down first.  I'd order the butchers to get going and set the number of people in the tavern to be quite low.  As you point out, fixing whatever is hurting the speed the most is going to provide the biggest return for fixing it.  Or to put it the other way around, if it's not broke much, fixing it won't help much.
Logged
Likes cats for their aloofness.