v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Editing v0.34:Maximizing framerate

Jump to navigation Jump to search

Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.

You are editing a page for an older version of Dwarf Fortress ("Main" is the current version, not "v0.34"). Please make sure you intend to do this. If you are here by mistake, see the current page instead.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 15: Line 15:
 
* Larger embark sites dramatically increase the amount of terrain which DF needs to keep track of and path through.
 
* Larger embark sites dramatically increase the amount of terrain which DF needs to keep track of and path through.
 
** Reducing the size of your embark site from the default 4x4 squares to 3x3 or even 2x2 will have an enormous impact on FPS.  Keep in mind that a 2x2 embark is only 25% of the size of a 4x4.
 
** Reducing the size of your embark site from the default 4x4 squares to 3x3 or even 2x2 will have an enormous impact on FPS.  Keep in mind that a 2x2 embark is only 25% of the size of a 4x4.
** The [http://www.bay12forums.com/smf/index.php?topic=21601.0 Nano Fortress] utility will let you play on a 1x1 title, which will result in exceptionally improved frame rate.
 
 
** World size probably doesn't matter except for the size of the save files, but reducing the number of cavern layers (default of 3) will help.  You need at least 1 cavern layer to get underground [[crop|plants]], and 2 caverns to get all the underground [[tree]]s.
 
** World size probably doesn't matter except for the size of the save files, but reducing the number of cavern layers (default of 3) will help.  You need at least 1 cavern layer to get underground [[crop|plants]], and 2 caverns to get all the underground [[tree]]s.
 
* Fewer items inside a fort means fewer items to be [[stockpile]]d, checked for [[wear]], and so on and so forth.
 
* Fewer items inside a fort means fewer items to be [[stockpile]]d, checked for [[wear]], and so on and so forth.
** The obvious solution is not to generate so many items in the first place. Don't build such large [[Farming|farm plot]]s and don't go overboard with multiple [[Workshop|workshops]] constantly queued or set on perpetual repeat.
+
** The obvious solution is not to generate so many items in the first place. Don't build such large [[Farming|farm plot]]s and don't go overboard with multiple [[workshops]] constantly queued or set on perpetual repeat.
** Bugs related to [[clothing]] used to make it a real FPS drain. Recent bug fixes, such as {{bug|3942}}, have improved the situation drastically. But checking for clothing [[wear]] and unhappy [[thoughts]] could still have some impact on FPS. (Research is needed.) As of [[Release information/0.34.11|0.34.11]], armor counts for missing clothing thoughts. So dwarves can wear armor instead of clothes or going naked. If nothing else, dumping excess/worn out clothing may help FPS on an old fortress.
+
** Use a [[Dwarven atom smasher]] to remove items, or donate them to [[Trading|passing caravans]] to be taken away.
** Use a [[Dwarven Atom Smasher]] to remove items, or donate them to [[Trading|passing caravans]] to be taken away. (Pasturing pets into the atom smasher can also reduce pathfinding significantly).
 
 
** [[Exploit#Quantum_stockpiles|Quantum stockpiles]] can [http://www.bay12forums.com/smf/index.php?topic=92241.msg3276117#msg3276117 reportedly] improve game speed.
 
** [[Exploit#Quantum_stockpiles|Quantum stockpiles]] can [http://www.bay12forums.com/smf/index.php?topic=92241.msg3276117#msg3276117 reportedly] improve game speed.
** The quantity of items in any particular stack doesn't effect framerate so much as the number of stacks in general, due to the resultant impact on [[hauling]], [[stockpiles]], [[pathfinding]] and other CPU-intensive tasks.  The research done on the [http://www.bay12forums.com/smf/index.php?topic=92241.0 Undump Engine] and [http://www.bay12forums.com/smf/index.php?topic=109319.0 Micha's experimental fort] demonstrate very FPS efficient solutions, while avoiding traditional stockpiles and the use of [[barrel]]s and [[bin]]s.
+
** Evidence has emerged that the ''quantity'' of items may not be the actual culprit, but rather the [[hauling]], [[stockpiles]], [[pathfinding]] and other CPU-intensive tasks they involveSpecifically, the research done on the [http://www.bay12forums.com/smf/index.php?topic=92241.0 Undump Engine] and [http://www.bay12forums.com/smf/index.php?topic=109319.0 Micha's experimental fort].  These seem to demonstrate very FPS efficient solutions, while avoiding traditional stockpiles and the use of barrels and bins.
 
* Flowing [[water]] slows the game down.
 
* Flowing [[water]] slows the game down.
 
** Don't build [[mist]] generators, [[Screw pump|pump stacks]], or other major water-moving projects.  If you do build them, build a [[Lever|way to switch them off]].   
 
** Don't build [[mist]] generators, [[Screw pump|pump stacks]], or other major water-moving projects.  If you do build them, build a [[Lever|way to switch them off]].   
Line 35: Line 33:
 
** Some careful fort planning and design can cut down on pathfinding with shorter trips.
 
** Some careful fort planning and design can cut down on pathfinding with shorter trips.
 
** Closing off unused areas with raised [[bridge]]s and locked [[door]]s can help.
 
** Closing off unused areas with raised [[bridge]]s and locked [[door]]s can help.
** Caverns are probably the worst offender for pathfinding in irrelevant areas. So keep them closed off.
+
** Caverns are probably the worst offender for pathfinding in irrelevant areas. So keep them closed off with bridges and locked doors.
 
* [[DF2012:Contaminant|Contaminants]] can accumulate on the ground and on dwarves and creatures. Especially for old forts, this can impact FPS.  There is a bug ({{bug|296}}) which makes contaminants continuously multiply and another ({{bug|3270}}) which prevents blood from ever disappearing.
 
* [[DF2012:Contaminant|Contaminants]] can accumulate on the ground and on dwarves and creatures. Especially for old forts, this can impact FPS.  There is a bug ({{bug|296}}) which makes contaminants continuously multiply and another ({{bug|3270}}) which prevents blood from ever disappearing.
 
** If the contaminants are outside, isolate the area and let [[DF2012:Weather|rain]] slowly wash it away.  Pets can be kept out with a [[Activity_zone#Pen.2FPasture|pen/pasture]] or a [[Activity_zone#Pit.2FPond|pit]].  Similarly, setting the [[traffic]] designation to restricted and/or assigning [[Activity_zone|Activity Zones]] strategically may keep dwarves away.
 
** If the contaminants are outside, isolate the area and let [[DF2012:Weather|rain]] slowly wash it away.  Pets can be kept out with a [[Activity_zone#Pen.2FPasture|pen/pasture]] or a [[Activity_zone#Pit.2FPond|pit]].  Similarly, setting the [[traffic]] designation to restricted and/or assigning [[Activity_zone|Activity Zones]] strategically may keep dwarves away.
** Add in some in-fortress means of cleaning dwarves and pets. The [[User:Uristocrat/Dwarven_Bathtub|Dwarven Bathtub]] is one example.  And make sure you have the [[cleaning]] labor enabled. Details of these and other suggestions can be found on the [[cleaning]] page.
+
** Add in some in-fortress means of cleaning dwarves and pets. The "[[Dwarven_Bathtub|Dwarven Bathtub]]" is one example.  And make sure you have the [[cleaning]] labor enabled. Details of these and other suggestions can be found on the [[cleaning]] page.
 
* Encountering [[HFS]] will dramatically reduce FPS AFTER you seal the breach ({{bug|1340}}). Either avoid doing so or use the work around posted in the bug report.
 
* Encountering [[HFS]] will dramatically reduce FPS AFTER you seal the breach ({{bug|1340}}). Either avoid doing so or use the work around posted in the bug report.
  
Line 59: Line 57:
  
 
====Game Settings====
 
====Game Settings====
* Consider running an older version of DF. While lacking features, 40d or a [[version]] of v0.31 ''may'' run faster than 2012. *Disputed* (See [http://www.bay12forums.com/smf/index.php?topic=122441.0 this topic] for a debate over FPS on 2012 vs v0.31, game settings, and other FPS issues.)
+
*Consider running an older version of DF. 40d should run better than 2010 or 2012, and 23a, while severely lacking, should be significantly faster. *Disputed*
* [[Temperature]] calculations place a significant load on the processor.
+
* [[Temperature]] and [[Weather]] are two more features which users may or may not notice.
** Especially since a bug causes "jitter", forcing recalculation every frame.{{Bug|6012}}
+
** Disabling them, using the settings in d_init.txt, can speed things up.
** Disabling them, using the settings in d_init.txt, will speed things up.
+
** But then rain won't refill [[murky pool]]s, [[magma]] won't melt [[goblin]]s, etc.
** Without temperature calculations, [[obsidian farming]] becomes unusable; as the tiles never cool down, dwarves refuse to step on the obsidian floor, preventing the access of hauling dwarves.{{bug|6033}} You can re-enable temperature occasionally to allow tile temperatures to normalize.
+
** Disabling temperature also results in obsidian farms being unusable; as they never cool down, dwarves refuse to step on the obsidian floor, preventing the access of hauling dwarves.{{bug|6033}}
** Multiple users have reported an increase of 100% or better when disabling temperature calculations[http://www.bay12forums.com/smf/index.php?topic=86761.msg2352509#msg2352509].
+
** One user [http://www.bay12forums.com/smf/index.php?topic=86761.msg2352509#msg2352509 reported] an FPS boost from 35 to 90 upon disabling temperature. (User note: Confirmed, went from 15 FPS to 70 FPS)
* Disabling [[weather]] ''might'' speed things up as well.
 
** But then rain won't refill [[murky pool]]s, clean contaminants, kill dwarves, etc.
 
 
* Each dwarf needs to keep track of where he's going.
 
* Each dwarf needs to keep track of where he's going.
 
** Limit the number of dwarves by setting the population cap.
 
** Limit the number of dwarves by setting the population cap.
Line 73: Line 69:
 
* Invaders also need to pathfind.
 
* Invaders also need to pathfind.
 
** Turn off invasions using the option in [[D_init.txt]]. Or you can kill them all.
 
** Turn off invasions using the option in [[D_init.txt]]. Or you can kill them all.
* [[Caverns]] can be a FPS hog due to [[pathfinding]] and how complex they can be. Creatures may try to path into your fort from a cavern. Sometimes even [[DF2012:Trading#Caravans|trading caravans]] will try to path to your fort underground.
 
** Adjusting the [[DF2012:Advanced_world_generation#Cavern_Layer_Number|Cavern_Layer_Number]] in [[advanced world generation]] parameters can reduce or disable the number [[cavern]] layers during [[world generation]]. However, this may restrict access to subterranean plants and creatures, [[DF2012:Megabeast|megabeasts]], and [[Demonic_fortress|fun features]].
 
** Similarly, one could adjust [[Advanced_world_generation#Layer_Openness_Min.2FMax|Layer Openness]] and [[Advanced_world_generation#Layer_Passage_Density_Min.2FMax|Layer Passage Density]] in [[advanced world generation]] to turn caverns into wide, open expanses instead of complex mazes that have to be pathed through. However, there is some evidence that excessively open caverns cause performance issues as well.[http://www.bay12forums.com/smf/index.php?topic=104643.msg3096896#msg3096896]
 
  
 
====Mods and Utilities====
 
====Mods and Utilities====
 
* Accumulations of [[contaminant]]s can decrease FPS and they are still somewhat buggy. (See {{bug|296}} and {{bug|3270}}.)
 
* Accumulations of [[contaminant]]s can decrease FPS and they are still somewhat buggy. (See {{bug|296}} and {{bug|3270}}.)
** Sometimes contaminants are widespread or difficult to reach such that relying on the usual [[cleaning]] methods would be impractical or impossible. Or the player make lack the patience to deal with it that way. Some opt to use the "clean" and "spotclean" commands in the [[Utility:DFHack|DFhack]] utility to clear contaminants.
+
** Sometimes contaminants are widespread or difficult to reach such that relying on the usual [[cleaning]] methods would be impractical or impossible. Or the player make lack the patience to deal with it that way. So some opt to [[Cheating|cheat]] by using the "clean" and "spotclean" commands in the [[Utility:DFHack|DFhack]] utility.
* Bug fixes for [[clothing]] (such as {{bug|3942}}) have reduced clothing-related FPS issues. But constantly-growing piles of cast-off clothes, and checking for clothing [[wear]] and unhappy [[thoughts]] still have some impact on FPS.
+
* Recent bug fixes for [[clothing]] (such as {{bug|3942}}) have largely resolved related FPS issues. But checking for clothing [[wear]] and unhappy [[thoughts]] may still have some impact on FPS. (Research is needed.)
 
** One could [[Modding_guide|modify]] clothing to prevent [[wear]]. (This would require a [[DF2012:World_generation|world regen]].) This can be done by adding an [[DF2012:Armor_token|ARMORLEVEL:1]] token. Aside from a possible FPS gain, this has other benefits as well. This fix is part of the [[DF2012:List_of_mods#Modest_Mod|Modest Mod]] as an optional "Eternal Fashion module". It might also be found in other mods which are based around Modest Mod. (Search the [http://dffd.wimbli.com/ DFFD] for "Modest".) Also, [[DF2012:List_of_mods#Masterwork_Dwarf_Fortress_.28MDF.29|Masterwork Dwarf Fortress]] allows the creation of metal clothing.
 
** One could [[Modding_guide|modify]] clothing to prevent [[wear]]. (This would require a [[DF2012:World_generation|world regen]].) This can be done by adding an [[DF2012:Armor_token|ARMORLEVEL:1]] token. Aside from a possible FPS gain, this has other benefits as well. This fix is part of the [[DF2012:List_of_mods#Modest_Mod|Modest Mod]] as an optional "Eternal Fashion module". It might also be found in other mods which are based around Modest Mod. (Search the [http://dffd.wimbli.com/ DFFD] for "Modest".) Also, [[DF2012:List_of_mods#Masterwork_Dwarf_Fortress_.28MDF.29|Masterwork Dwarf Fortress]] allows the creation of metal clothing.
 
* Some mods have been created specifically to improve performance. They often reduce and standardize materials (like leather and bone) and may reduce the types of clothing available to control item count (especially for invaders).
 
** [http://www.bay12forums.com/smf/index.php?topic=117954.0 Accelerated Dwarf Fortress] for v0.34.11
 
 
 
==DFHack commands==
 
A list of [[Utilities#DFHack|DFHack]] 0.34.11 r3 commands that can help with your framerate by fixing bugs and reducing items.
 
 
*{{DFtext|autodump|white}} Useful for mass dumping or destroying items. Use {{DFtext|help autodump|white}} for options.
 
*{{DFtext|cleanowned|white}} Confiscates and dumps garbage owned by dwarves. Use {{DFtext|help cleanowned|white}} for options. Can cause unhappy thoughts if no replacement clothing is available.
 
*{{DFtext|clean|white}} and {{DFtext|spotclean|white}} Removes contaminants from tiles/units/items or one tile. {{bug|296}}{{bug|1750}}{{bug|3270}} Use {{DFtext|help clean|white}} for options.
 
*{{DFtext|flows|white}} Counts map blocks with flowing liquids, which slow the game down.
 
 
*{{DFtext|tweak stable-temp|white}} Removes jitter in temperature updates. {{bug|6012}} Must be enabled every time DFHack is launched.
 
**{{DFtext|fix/stable-temp apply|white}} Fixes existing item temperature jitter bugs.
 
*{{DFtext|tweak fast-heat|white}} Further improves temperature update performance.
 
 
*{{DFtext|tweak fix-dimensions|white}} Fixes subtracting small amount of thread/cloth/liquid from a stack. Must be enabled every time DFHack is launched.
 
**{{DFtext|fix/cloth-stockpile|white}} Fixes existing bugs in thread/cloth stockpiles. {{bug|5739}}
 
 
*{{DFtext|fix/fat-dwarves|white}} Stops fat dwarves causing lag. {{bug|5971}}
 
*{{DFtext|fix/item-occupancy|white}} Fixes invisible items. {{bug|895}} May increase performance slightly.
 
 
 
*{{DFtext|fastdwarf 0 1|white}} In a fortress of 152, my FPS was hovering around 60, and fast dwarf was enabled it dropped to upper teens, and teledwarf only dropped it into the mid 40's. Fastdwarf does modify the game balance and is generally considered cheating, so this tip is meant for people who already utilize fastdwarf.
 
  
 
==Mac OS X Specific==
 
==Mac OS X Specific==

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)

Templates used on this page: