Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Low FPS for a relatively mundane fort  (Read 2041 times)

MagmaSolutionsInc

  • Bay Watcher
  • Likes elves for their screaming, bubbling noises.
    • View Profile
Low FPS for a relatively mundane fort
« on: December 29, 2011, 08:22:41 am »

Hey all,

Relatively new DF player, been through the usual learning curve and now successfully creating workable fortresses. I did find RuneSmith quite useful to get through the first few forts after some early failures, but I'm gradually learning to let go of it  :) I did find it particularly handy for killing off ghosts that couldn't be memorialised (eg. reclaim of a site, possible bug in a couple of cases), and also for bringing a critical dorf or two back from insanity (had both successes and failures with that).

I've had great times discovering much of the "fun" to be had... my most epic fort to date came to a sudden, unexpected end when I decided to just murder caravans. That was fine with the human and elf delegations. Then I killed the dorf traders ...

One epic tantrum spiral/civil war later, I started the current fort. I haven't yet had the chance to get a fort to adamantine levels, but wanted to play with cotton candy - so I modded the raws to enable the "free" adamantine wafers and thread options in my smelter. Armor, weapons, and of course insanely valuable craft items...

 It has a multi-z level building above ground which serves as a bridge over the river (with airlock/bridge/pit to dump enemies into at both end), which delves into the earth down to the trade depot (also protected by a bridged pit at the entrance), and then to the workshop/furnace, store room, bedroom, and burial levels. The above ground building serves as meeting area (building over the river gives me an easy multi-story well), training room (with single spear/spike trap triggered by multiple pressure plates), barracks, and jail.

We've seen off a dragon (disappointingly, he killed all the livestock in the pasture, breached one door, and was killed by my militia commander in one hit - adamantine edged weapons obviously work well) and a titan which, admittedly, I gave my dorfs a helping hand with runesmith to defeat (more due to frustration at the slowness of training). I panicked at a forgotten beast made of steam, and designated it as dead with runesmith.

Various goblin sieges and ambushes are, relatively speaking, a doddle. If my airlocks don't get them, my militia certainly will. The only flaw there is that the pits aren't deep enough - they were an afterthought, and had to go only about 5 z-levels to avoid breaching my storage areas - but they're enough to cause some broken limbs and eventual death.

I've had a look with dfhack's reveal and there's no real reason to dig down below the 2 cavern layers I've already breached. Indeed, I needn't have bothered with them - not much of interest. Sadly the magma levels don't look worthwhile in this map, and the HFS is under several layers of pure molten rock  (aside from the candy, which of course I don't really need). So there's not that much of the underground actually excavated.

Strangely, this fort is really quite mundane in contrast to others I've created, and has only 130 dorfs, but frame rate is a lousy 30 fps. There's not a lot to account for this - I've essentially murdered all visible creatures, I only have one windmill powering a mill (haven't got deeply into powered creations yet), I make a habit of dumping all stone into a Garbage room, and I've even run DFHack's clean all to eliminate any blood/etc from dorfs and surrounds. Perhaps the only real difference between this and other creations that have retained good fps is that each dorf has their own bedroom with door and cabinet.  Previously I've only been bothered to create dormitories and barracks.

This map has a road running through it in addition to the river, though. Perhaps worldgen roads can have an impact on fps? It's a bit of a strange road that follows the terrain (mostly) - I built a bridge over the river to "complete" the road, and several z-levels above that is a partly finished wall+floor "bridge" from worldgen - it only goes half way across.

I was thinking that maybe there is some kind of pathing "bug" with the road and "bridge". Anyone encountered similar?

Apologies in advance for the long post  :-\
Logged
stopped zombie cats from adopting dwarves

... with magma.

Drawde

  • Bay Watcher
    • View Profile
Re: Low FPS for a relatively mundane fort
« Reply #1 on: December 29, 2011, 02:43:56 pm »

The main FPS eater is pathing.  The more choices the game has to reach point B from point A, the slower the game goes.  So big open areas or branching and recrossing hallways add more computations.  Designating traffic areas (d)(o) can help.  Mark the main path you want as high, and areas you want no one to go, or that just plain aren't used for traveling (housing off to the side, for example) to as restricted.  Note that this does not prevent the dwarves from USING restricted areas, it just means they'll prefer using the high traffic zones.  Also wall off empty mines and such, including unused caverns.  If the dwarf can travel through it, it can be considered for pathing.

The size of the map effects this as well.  Bigger maps mean more possible paths.

The river is also a FPS eater.  Flowing liquids eat up computations, since the movement has to be figured out each time things are computed.

A couple of things most don't consider effect FPS as well.  Mainly world size and other civilizations.  The more there is outside of your fort, including invaders, megabeasts, and titans, the more your computer has to calculate to see if they're going to interact with you.
Logged

Madventurer

  • Bay Watcher
    • View Profile
Re: Low FPS for a relatively mundane fort
« Reply #2 on: December 29, 2011, 02:48:01 pm »

Temperature, weather... They also slow stuff down much. You can turn them off, unless you really need them (Magma is basically different kind of water)
Logged
Then he made grudge wit about 20 other dwarfs (still don't know why - perhaps they were stealing his chair).

Mitchewawa

  • Bay Watcher
  • My pick is the pick that will pierce the heavens!
    • View Profile
Re: Low FPS for a relatively mundane fort
« Reply #3 on: December 29, 2011, 03:56:24 pm »

To put the pathing-calculation FPS eating; I play on a good quality PC. My FPS jumps up 20 whenever I block off a cavern layer.
Logged
Mitch cancels sleep: Interrupted by Clowns

Callista

  • Bay Watcher
    • View Profile
Re: Low FPS for a relatively mundane fort
« Reply #4 on: December 29, 2011, 04:46:38 pm »

Yeah, my FPS always drops while I'm doing exploratory mining, trying to find gems or ore. All that pathing really does slow things down. Be sure to block off the mineshafts after you're done extricating the useful things from them.
Logged

MagmaSolutionsInc

  • Bay Watcher
  • Likes elves for their screaming, bubbling noises.
    • View Profile
Re: Low FPS for a relatively mundane fort
« Reply #5 on: December 29, 2011, 08:35:17 pm »

Thanks for the tips guys - will give them a shot :)

Should've mentioned that this is a new Alienware notebook with the 2nd gen core i7, etc. DF doesn't come close to making it break a sweat, but within the confines of what DF allows itself to use, this is the first time it's really nommed the FPS in spite of having done a lot more with other forts.
Logged
stopped zombie cats from adopting dwarves

... with magma.

MagmaSolutionsInc

  • Bay Watcher
  • Likes elves for their screaming, bubbling noises.
    • View Profile
Re: Low FPS for a relatively mundane fort
« Reply #6 on: December 29, 2011, 09:15:37 pm »

Yeah it must be pathing. The "best" path to the trade depot to fend off trolls for my militia was out another entrance (into the main goblin force) and across a pit with bridge retracted, instead of straight down the stairs. Sigh.

Very dwarfy though. They played goblin golf and then went down to the depot. After I put the bridge back.
Logged
stopped zombie cats from adopting dwarves

... with magma.

Dwarfus

  • Bay Watcher
    • View Profile
Re: Low FPS for a relatively mundane fort
« Reply #7 on: December 31, 2011, 07:07:57 pm »

For a long time I had tried to use four central columns of stairs in my fortress, hoping this would make pathing easier. It sounds like that's the opposite of what it does, making it much worse. Is it simply better to have a single 3x3 staircase running up the center of a multi-z-level fortress rather than several of them?
Logged

Xenogenic

  • Bay Watcher
  • Because you will find the magma leak eventually.
    • View Profile
Re: Low FPS for a relatively mundane fort
« Reply #8 on: May 30, 2012, 06:01:13 pm »

I'd think the multiple stairways are still good as long as it means locations which dwarfs need to travel back and forth between can be reached quicker. A single central stairway means a dwarf has to go down one hallway, go up the stairs and come back down a hallway just to get to a tile one z level above. Multiple stairs should help here. An example would be multiple stairways in your factory area.

However having multiple stairs for stuff that's just going to be far apart no matter what (fortress to magma forges) seems like it would cause problems. You'd want just a single long path for that.
Logged
Dwarven Safety is kind of like a gun in a kindergarten. every single toddler wants to play with it and they will put elaborate plans in motion to get their hands on it. A hundred tiny hands grasping for death and crawling all over you begging for it.

vjek

  • Bay Watcher
  • If it didn't work, change the world so it does.
    • View Profile
Re: Low FPS for a relatively mundane fort
« Reply #9 on: May 30, 2012, 06:05:13 pm »

An undead siege has arrived!

A five month old post, attacks the thread!
The thread is surprised at the ferocity of the attack!

Thorik

  • Bay Watcher
  • Inspector of Conspicuous Cheeto Consumption
    • View Profile
Re: Low FPS for a relatively mundane fort
« Reply #10 on: May 31, 2012, 08:03:25 am »

By the way you need not have cheated to kill the steam monster, things made out of water or steam and such flimsy things die usually in one hit.
Logged
I like sushi.

ab9rf

  • Bay Watcher
    • View Profile
    • ab9rf@github
Re: Low FPS for a relatively mundane fort
« Reply #11 on: May 31, 2012, 09:04:22 am »

The main FPS eater is pathing.
No, it's not.  Temperature calculations are the main CPU sink in DF.  And your thesis (that multiple paths make pathing slower) is simply wrong.  A* quits searching as soon as it finds any path.  It does not compute all possible paths and then pick the shortest; rather, the A* heuristic typically produces shorter paths earlier longer ones and so the first path found will typically be nearly optimal.
« Last Edit: May 31, 2012, 09:08:22 am by ab9rf »
Logged