Bay 12 Games Forum

Please login or register.

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

Author Topic: Help with Framerate  (Read 1736 times)

Encrtia

  • Bay Watcher
    • View Profile
Help with Framerate
« on: October 20, 2016, 06:47:39 pm »

Hey,

I've been playing DF & MDF for quite some time now (though not long enough to fix my current issue), & I keep having to abandon Forts because of the stupid FPS. And I've had it up to here with it. It starts off when my 150(30) FPS starts dipping to 130 when underground, & when above ground, it takes a massive hit out of nowhere for seemingly no reason whatsoever. I'm just praying to the gods that (from what I've heard) multi-threading will exist one day. But in the mean time, can you help me out with my current Fort? Please..

I'm not (as far as I'm aware) building massive forts of crazy complexity.
I'm not even touching liquids.
I'm not getting catsplosions (& every time I get a dogsplosion, I massacre them all which doesn't even help the FPS)
I've tried all the DFHacks on the Wiki to attempt to rectify it (auto-dumped all lying around items + atom smashed, clean, spotclean, etc. etc. whatever)
I don't even have more than 50 Dwarfs when it happens
Currently I've only reached the 1st Cavern & I'm already starting to see the forts inevitable doom
I used to roll out with 5x5 zones, but reduced it to 3x3 now, & it STILL takes FPS hits at what feels like a similar point of Fort Progression
My PC is a Dual GTX970, overclocked i7 Quadcore with 32GB of Memory beast. SSD + 64-bit too. I wish it my hardware helped me play DF as smoothly as modern triple A's :(

If possible, can someone just have a look at my save game from the 16/10/16 release of MDF, & maybe find a reason as to why my FPS is dropping in the current fort? Some sort of cure or something obvious I've missed!? Or perhaps a better way to handle FPS drops that I don't know / aren't on the wiki, etc.
It hasn't dropped massively yet, but why has it started to dip below 150 to 130?

My save game is here: https://www.dropbox.com/s/jwkqar7fl4hdqox/current.rar?dl=0
My MDF settings here: https://www.dropbox.com/s/57my6b1ig74acme/Custom%20Profile.JSON?dl=0

FYI: In addition to killing all dogs & dfhacks, I've tried Atom Smashing my entire Bar stocks (which I thought was the cause of it), removed all Manager orders, removed Workflow Constraints, & removed my metal industry workshops (because it was around that time I noticed the FPS dipping).
« Last Edit: October 20, 2016, 09:29:54 pm by Encrtia »
Logged
~When death smiles at you, just smile one back.

Amostubal

  • Bay Watcher
    • View Profile
Re: Help with Framerate
« Reply #1 on: October 20, 2016, 08:46:48 pm »

just going to let you know... you uploaded an empty folder.  there's no game save in that file.  second 150 to 130 isn't much of an issue... I generally play 5 to 10 years in a fortress and really get upset when fps reaches 8 to 9, lols.  So how low is too low is a personal preference, whats the worst you let it get to before it FPS dies?
Logged
Legendary Dwarf Fortress
Legendary Discord Group
"...peering into the darkness behind the curtains, evokes visions of pixies being chased by dragons while eating cupcakes made of coral iced with liquid fire while their hearts burn out with unknown plant substances..." - a quote from the diaries of Amostubal

xordae

  • Bay Watcher
    • View Profile
Re: Help with Framerate
« Reply #2 on: October 20, 2016, 09:26:29 pm »

...You're seriously worried about 130 FPS?

The game framerate is going to tank slowly but steadily the more you build, the more dwarves and visitors and items you have in your fort. And hardware won't make that much of a difference.

FPS taking a hit above ground is related to your graphics settings, if I had to guess. Try STANDARD or VBO as a print mode. Also try either VSYNC or ARB_SYNC. I assume you're on 60Hz so 30 G_FPS is just fine, it's what I play at too.

Intermittent FPS issues are often related to dwarves stuck on trees or NPCs that are in combat / can't path properly. Those will pass.
Logged

Encrtia

  • Bay Watcher
    • View Profile
Re: Help with Framerate
« Reply #3 on: October 20, 2016, 09:35:55 pm »

I've re-attached it. Somehow I missed it.

I pointed out Hardware didn't help. And I was explaining that once I see it going to 130, before long, it becomes really bad. And I'm trying to optimize things early on than when the affair gets messy - because like I said, it gets to a point where the FPS hit becomes unbearable - can't remember how low it got, but it was damn slow... So yes, I am worried when I see 130 FPS from an otherwise 150(30) perfect game thus far.

What I'm addressing isn't anything intermittent, naturally those passed :) I'll try out different graphics settings to see what happens, thanks
Logged
~When death smiles at you, just smile one back.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Help with Framerate
« Reply #4 on: October 21, 2016, 03:59:03 am »

You are aware that 100 is the max in vanilla DF and I changed the init to allow it to go up to 150; and that people are used to play with low double-digits in FPS?
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Encrtia

  • Bay Watcher
    • View Profile
Re: Help with Framerate
« Reply #5 on: October 21, 2016, 08:23:10 am »

No, I wasn't aware :P Of either points. Normally I kept the FPS off, but started turning it on when it was concerning me. I guess that's the answer I was looking for - it's the norm & unavoidable. damn

Thanks for letting me know.
Logged
~When death smiles at you, just smile one back.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Help with Framerate
« Reply #6 on: October 21, 2016, 08:37:53 am »

Ok :)

The game gets slower the longer you play, because more units walk around and more items exist. Its normal. A real dip in framerate comes usually from extreme amounts of units (like digging too deep) or from liquids, especially magma.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Amostubal

  • Bay Watcher
    • View Profile
Re: Help with Framerate
« Reply #7 on: October 21, 2016, 09:00:30 pm »

Well I downloaded your map... I run it at 30fps....  would be normal for me.... So here is the issues I see.
1.  Too many stockpiles.  more stockpiles=more jobs created to fill said stockpiles. 
FIX:  Use 3x3 stockpiles that are specific to what you want used for particular jobs, 0 bins 0 barrels, set them to give to the workshops that are to use those items.  ex. a 3x3 stockpile for plump helmets to give to a still.  3 3x3 stockpiles for iron, flux, and coal to give to a shop producing steel bars.
As the shop uses the items the stockpiles are emptied and jobs are queued to refill the stockpiles.  Sometimes this is hard to setup, but it reduces job counts.

2. too many items sitting in stockpiles zones. 
FIX: Use quantum stockpiles in place of large stock zones.  don't stockpile items that could just be moved from their shops to placement, i.e. furniture, blocks, etc.  Best targets for quantum stockpiles are wood,stone,food and refuse(if your planning on saving/using refuse). 
to accomplish quantum stockpile start with a 3x3 stockpile remove center and 1 other directly to the E,W,N,or S. Replace the center square with a new stockpile that matches the original stockpile.  In the other removed square, place a track(build or carve).  On top of the track build a TrackStop that dumps in the direction of the center square. build a minecart.  Use hauling routes menu to build a new hauling route, stop on the TrackStop, no push/ride/guide setting for the stop, take from the larger stockpile, hit enter to set goods to that of the stockpile, set the minecart to the new route.  Now you have a stationary minecart that will never fill, always dump to the center, and all the items that land in the center square will stack forever.  Eventually all the items of that selected stockpile will end up in the pile.  DO NOT USE BINS OR BARRELS in a quantum stockpile.  in the end you reduce all the jobs to move these items to stockpiles to just 7 and 7 jobs to move these items into the minecart.

3.  Too many free roaming creatures... confine them to pens, preferably close to a farmers workshop so they can be sheared/milked and returned.  Only vermin killers such as cats should be free roaming.  All the creatures that need vermin for food will dig them up in any pen of any size they live in (even if the pen is 1x1 and contains a nest box. which is the best setup for birds, they have no need for pathing computations.)

4.  Too many crops, you can feed an entire fort of 100 units on 5 to 10 3x1 farmplots, reduced needs for fertilizer, reduced storage and job needs.

5.  Too many paths.  Tree pathing(large branches with smaller branches extending off it that may have smaller branches extending off them) increases fps.  Limit the available paths for units to travel through.  I ran it for 20 mins and much of the fort is not in use, yet the game considers all paths when selecting a path, so occasionally a unit leaves a stockpile climbs up a stair circles the entire fort to come back down another stair to reach a shop due to a path being blocked by a unit trying to move a stone, bin, or barrel.  In the end a few wider halls between shops and stockpiles while blocking circular paths would increase FPS.

6.  Too many haulers.  everyone will check every labor they have for available jobs, which means they will all check and see if they should grab an item and move it to a stockpile. Instead try too use 1 hauler per 2-4 labors(not counting military who should have no labors selected).

7.  No Burrows....  Okay this is one even I hate to do along with 6... Autolabor eats fps.  If you have a legendary stonecrafter, he doesn't need to be a wood cutter or a miner.  Instead make him a burrow that is just his, include his bedroom, a dining room, a stockpile for what you want him to work on and some workshops for his work.  Set permissions on the shop to him. done.  now he only has a small set of options so less computation on his next job selection.

And I could probably come up with other suggestions, but these are the big ones.  I know a lot of people say items are the cause of FPS problems, but the truth is stockpiles, bad labor management, excessive jobs, excessive food generation, and circular thin pathing causes more computations.

So I played it for 40 mins total. I built a few walls. restricted traffic through the restrict traffic menu to the unused portions of the fort. Penned all the animals. slaughtered them down to 5 fk 1 mk 5 fa 1 ma.  Removed Hauling from all but 15 dwarves.  Removed all the stockpiles for bars,blocks,furniture, finished goods.  Reduced the size of stockpiles for stone, wood, food, and refuse. Didn't get around to quantum stockpiles, but thought about it... gained 50fps, 30 to 80fps.  If I had really worked on cleaning it up I could of probably reached 100fps on my old system sitting here, but I had a migrant wave and really wanted to stop messing with it.  Its salvageable, but your hardware already has my little laptop beat.
Logged
Legendary Dwarf Fortress
Legendary Discord Group
"...peering into the darkness behind the curtains, evokes visions of pixies being chased by dragons while eating cupcakes made of coral iced with liquid fire while their hearts burn out with unknown plant substances..." - a quote from the diaries of Amostubal

Amostubal

  • Bay Watcher
    • View Profile
Re: Help with Framerate
« Reply #8 on: October 21, 2016, 09:09:04 pm »

Ok :)

The game gets slower the longer you play, because more units walk around and more items exist. Its normal. A real dip in framerate comes usually from extreme amounts of units (like digging too deep) or from liquids, especially magma.

yeah liquids - - - especially large amounts of falling liquids.... although I did set up a 3 story 11x11 flood room over dining room over bedroom that generated a waterfall on all 4 sides through grates into a tunnel below that flowed out through a fortified edge wall.  Almost no FPS drop from it until I tried to extend it 10 more floors and dump it in a 6 deep cavern.... that dropped my fps to single digits and eventually caused it to freeze when an seige occured....
Logged
Legendary Dwarf Fortress
Legendary Discord Group
"...peering into the darkness behind the curtains, evokes visions of pixies being chased by dragons while eating cupcakes made of coral iced with liquid fire while their hearts burn out with unknown plant substances..." - a quote from the diaries of Amostubal

Encrtia

  • Bay Watcher
    • View Profile
Re: Help with Framerate
« Reply #9 on: October 21, 2016, 09:32:35 pm »

Blah Blah... insert valuable wisdom here

Jeez man, you certainly gave a generous amount of time to helping me out here :) I almost speechless!

Sweet Jesus. All this time I thought Quantum Stockpiling was just when I made a Dump Zone, then dumped everything there (Which I normally did with Stones & Wood) :O But this is the real deal! I'm going to have to try this out right away :O
The only free roaming animals were the dogs, but looks like they have to go. And smaller pens for the birds it is!
The crop situation is undoubtedly true... I just became aware that 1x7 plots would be the best use of fertilizer (which I've never used) & the total plots used covers all the underground grow-able plants.
I guess my aesthetically pleasing castle arrangement will have to be scrapped until multi-threading exists to lift the path-finding & liquid workloads. Balls...
Did not know point no.6. Will have to enforce some regulations on that now.
The burrows aspect already sounds like something I'd dislike doing too haha, but it's a concept that never occurred to me. I do use one burrow to keep everyone inside the fort in case of an emergency invasion, but then I get a thousand announcements stating that they can't reach what they want to (which is on the surface, outside of the burrow) so assumed that burrows were more akin to making a Door not Pet-Passable (where all the damn pets still spam the door in a vain attempt to pass).

Never touched traffic restrictions, & honestly didn't think it'd matter if there was just empty space lying around. I mean, when I did mass Marble Excavation (like a 30x30 square), I made a 3x3 wall around the entrance to limit the lag, because that's when I started to get the worst lag ever. But it didn't seem to help in that instance, which demoralized me enough to abandon (M)DF until now. But looks like I'm going to just have to come up with a very FPS Economical fort. Back to the drawing boards on that one!

And again, many many thanks for taking the time to look over my case. I truly appreciate it :) A lot to think about now :p
Logged
~When death smiles at you, just smile one back.

Amostubal

  • Bay Watcher
    • View Profile
Re: Help with Framerate
« Reply #10 on: October 22, 2016, 06:07:20 am »

Blah Blah... insert valuable wisdom here

Jeez man, you certainly gave a generous amount of time to helping me out here :) I almost speechless!

Sweet Jesus. All this time I thought Quantum Stockpiling was just when I made a Dump Zone, then dumped everything there (Which I normally did with Stones & Wood) :O But this is the real deal! I'm going to have to try this out right away :O
The only free roaming animals were the dogs, but looks like they have to go. And smaller pens for the birds it is!
The crop situation is undoubtedly true... I just became aware that 1x7 plots would be the best use of fertilizer (which I've never used) & the total plots used covers all the underground grow-able plants.
I guess my aesthetically pleasing castle arrangement will have to be scrapped until multi-threading exists to lift the path-finding & liquid workloads. Balls...
Did not know point no.6. Will have to enforce some regulations on that now.
The burrows aspect already sounds like something I'd dislike doing too haha, but it's a concept that never occurred to me. I do use one burrow to keep everyone inside the fort in case of an emergency invasion, but then I get a thousand announcements stating that they can't reach what they want to (which is on the surface, outside of the burrow) so assumed that burrows were more akin to making a Door not Pet-Passable (where all the damn pets still spam the door in a vain attempt to pass).

Never touched traffic restrictions, & honestly didn't think it'd matter if there was just empty space lying around. I mean, when I did mass Marble Excavation (like a 30x30 square), I made a 3x3 wall around the entrance to limit the lag, because that's when I started to get the worst lag ever. But it didn't seem to help in that instance, which demoralized me enough to abandon (M)DF until now. But looks like I'm going to just have to come up with a very FPS Economical fort. Back to the drawing boards on that one!

And again, many many thanks for taking the time to look over my case. I truly appreciate it :) A lot to think about now :p
yes I did like the design.  But I run on an older laptop, 4GB ram, 2.20 ghz intel pentium processor.  I have to limit the random job creation to maintain ability for game play.  I found the layout to be interesting, but I can't be creating unused space. 

heres a spoiler for an operating quantum stockpile:
Spoiler (click to show/hide)

to get around the dig outs and fps drops from them, I find that the best is to leave the unwanted stones on the ground, and only dig out enough to get ~50 to ~100 of the stone I want.  Then comes the math, most non ore stones drop at 25% so to get 50 I need to dig 200 squares of a layerstone, ores are 33% so 150 squares for 50.  Slower expansion and then walling off unused empty space will help keep mintain FPS.  I'll use a 3x3 stockpile set to say hematite with 5 wheelbarrows assigned to it. Link that to a ore processor.  Now then when I order hematite to be processed, my haulers are notified that 3x3 stockpile is emptying, they run over grab a wheelbarrow and fly to the next hematite ore in the list and fly it back up and drop it off.  Stone sitting around wont stop dwarves from walking right past if need be, it doesn't affect value and if they need too they will move it to build things.

To reduce junk stone, instead of trying to stockpile it all, I build a brick oven and an archeaologist next to a 3x3 stockpile that accepts all the stones that aren't flux or ore. When i'm not producing other things at the forge or wasting fps accomplishing some other task, I'll run all the junk stone through those 2 buildings.  The items earned from excavating stone are valuable and your getting 1 item for 5 stones you weren't going to use anyway(I usually get tons of obsidian weapons and armor from this action, trade goods, the rest are usually relic, chest, fossil "gems" which I process further and occasionally come out as really interesting high end furniture).  Bricks from the brick oven are useful for construction or for stonecrafter tables, as you can decide the color and its magma safe.... so your dreams of an all lavender fort can be realized without scouring an entire map for lavender Rutile stone.  I like to choose a single color and keep 100 bricks on hand, then make every piece of furniture I need out of that color brick at the stonecrafter table, which reduces the need to chop down trees for things.

Back to magma.  I don't use non-magma shops on MWDF for dwarves.  Its too easy to locate a blood of armok gem and make a magma well, flood a channel under a workshop row, build magma shops on top of them.   I try to build the magma and water wells immediately when I get the gem for them, to keep them from falling into artifacts or accidentally being cut.  This reduces the fuel needs drastically and allows me to reduce the need to cut wood, by the second or third month, I don't cut wood unless I have no other source to make fuel for steel.  which brings me to Crematoriums.  build one next to your refuse pile, use it to turn  junk body parts/vermin remains into ash for soap, ink, fertilizer.  I find I rarely need to use a wood furnace for ash after I get past the initial "stocking" in the these 3 industries.

Also your embark site was a heavily tree growth.  Scarce is better, as trees and other above ground growths eat FPS... try to embark on sites with only 1 square of heavy trees/8 none or 3 scarce/6 none for better above ground fps rates.

Basically FPS was the first problem I started tackling in vanilla DF after my first month of play, My system wouldn't run a fort past the first year because of FPS issues.  So I started reading everything on what causes and eats data in DF and discovered that we generate most of these issues.  Since then, I've built cities, dams, giant temples, etc on 4x4 and 5x5 embark sites, that ran for 5+ in game years at FPS of 50 to 60 on my legacy system.  It just takes time to be more patient and understand the limits on the single thread program design. 
Logged
Legendary Dwarf Fortress
Legendary Discord Group
"...peering into the darkness behind the curtains, evokes visions of pixies being chased by dragons while eating cupcakes made of coral iced with liquid fire while their hearts burn out with unknown plant substances..." - a quote from the diaries of Amostubal

There Is No Vic

  • Bay Watcher
    • View Profile
Re: Help with Framerate
« Reply #11 on: October 27, 2016, 11:46:44 am »

I always enjoy new FPS tricks. Thanks for posting all of the helpful suggestions.
Logged

Encrtia

  • Bay Watcher
    • View Profile
Re: Help with Framerate
« Reply #12 on: November 03, 2016, 12:11:29 am »

One last question though: Where do you find the Blood of Armok / Tear of Armok? I've yet to ever see either before.
Logged
~When death smiles at you, just smile one back.

Amostubal

  • Bay Watcher
    • View Profile
Re: Help with Framerate
« Reply #13 on: November 03, 2016, 06:18:30 am »

gems underground... its easier to just hit reveal and prospect in dfhack to find them... They are single square clusters like mithril and other super rare gems, fossils, relics, and chests(the later 2 are found in crumbling wall veins, while fossils are random as far as I can tell... maybe the raws have more info).  If you have aquifers on at least the tears of armok will make the stone around them damp like an aquifer is nearby.... they don't actually flood like an aquifer.

the only good usage is dwarven magma and water wells, they only require 1 gem, pump operator skill and architecture(?maybe, don't remember?).  They spawn magma/water on the next level below them(one square past its workshop edge) and it does not require a channel for it to operate(none of the race wells/fluidcasters require it).  Additionally you can have all 4 spawn directions in operation at once, so it can fill 4 separate tunnels and keep them filled indefinitely (at least until the game breaks and you have to restart them;fps death/abandon/retire; or it starts producing wrong fluid which I've seen on 2 maps which ended those maps for me) .  Other races don't have access to using them for wells.  The succubus version of magma well(no water) uses a cauldron; the orc version (fluidcaster) uses obsidian for magma and water buckets for water.  Humans are stuck doing it the old fashioned way, unless they gave them one I don't know about(I just never needed much in the way of magma with them anyway, gold coins FTW).  Kobolds don't dig deep enough.

  Armok gems are fairly decent price, I place them in restricted stockpiles for "artifact work" on non-dwarf races, or build them into wells even if not in use then destruct the building when a mood is available.  Gem windows for succubus cry babies nobles are also nice since windows seem to be highly valued by succubi.
« Last Edit: November 03, 2016, 06:24:20 am by Amostubal »
Logged
Legendary Dwarf Fortress
Legendary Discord Group
"...peering into the darkness behind the curtains, evokes visions of pixies being chased by dragons while eating cupcakes made of coral iced with liquid fire while their hearts burn out with unknown plant substances..." - a quote from the diaries of Amostubal

GhostDwemer

  • Bay Watcher
    • View Profile
Re: Help with Framerate
« Reply #14 on: November 03, 2016, 03:25:23 pm »

I wonder why we can't buy Tears/Blood of Armok through the fine goods shop anymore? There are plenty of embarks that don't have them.
Logged
Pages: [1] 2