This article is about an older version of DF.

More Info

A picture of Dwarf Fortress with Frames Per Second displayed.

Framerate is used in Dwarf Fortress to measure the speed at which the game is running. It is measured in "frames per second", or FPS for short. To check your FPS in Dwarf Fortress, simply change [FPS:NO] to [FPS:YES] in init.txt, and your FPS will be displayed on the top row of the screen. The first number is the current frame rate, while the number in parentheses is the current graphical frame refresh rate.

Increasing your Framerate [ edit ]

In general, the more stuff the game has to keep track of, the slower the game will run. So, reducing the amount of stuff active keeps your game running fast. The below lists separate ways to improve FPS into two categories: things that don't change the game in any fundamental way, and things that do.

Without Game Alterations [ edit ]

Fortress design is specific ways of building and planning, game setting changes are changes mostly in the init and init_d files that don't actually change how the game plays out.

Fortress Design [ edit ]

Game Settings [ edit ]

G_FPS is a setting in the init.txt file. It controls how often Dwarf Fortress redraws the screen. It also controls how often the game checks for keyboard or mouse input. Reducing G_FPS can speed up the rest of the game. The default choice of 50 works well, but many people reduce it down to 20 with no ill effect. Reducing G_FPS too far can make the game unresponsive and glitchy. Some people can cope with 5; most cannot.

PRINT_MODE is another init setting. It controls the method Dwarf Fortress uses to draw the screen. More advanced methods allow DF to make more use of OpenGL features and therefore your graphics card. STANDARD and VBO are good starting points. More advanced methods may still have bugs. 2D is more likely to be reliable.

Using creature graphics may reduce FPS. (Using a custom ASCII tileset should have no effect)

PRIORITY represents how much importance the game is given when it makes a request of the CPU. From init.txt: "Change this to make the dwarfort.exe process have a different priority. From highest to lowest, the options are REALTIME, HIGH, ABOVE_NORMAL, NORMAL, BELOW_NORMAL and IDLE." While it's best to run DF with no other programs in the background if FPS is an issue, giving the priority a bump or two can help speed things up regardless.

TEXTURE_PARAM controls how the graphics are displayed, specifically how the color value of each pixel is smoothed. It is LINEAR by default. Turning this off gives the CPU one less thing to do, though the improvement in performance is so far unquantified. From init.txt: "Change this to NEAREST if you want the texture values to use the nearest pixel without averaging. Change this to LINEAR if you want the texture values to be averaged over the adjacent pixels."



With Game Alterations [ edit ]

All changes in this area have some effect on the game itself, use at your own discretion.

Game Settings [ edit ]

Mods and Utilities [ edit ]

Accumulations of contaminants can decrease FPS and they are still somewhat buggy. (See Bug:296 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 DFhack utility to clear contaminants.

Bug fixes for clothing (such as Bug:3942 wear and unhappy thoughts still have some impact on FPS. One could modify clothing to prevent wear. (This would require a world regen.) This can be done by adding an ARMORLEVEL:1 token. Aside from a possible FPS gain, this has other benefits as well. This fix is part of the Modest Mod as an optional "Eternal Fashion module". It might also be found in other mods which are based around Modest Mod. (Search the DFFD for "Modest".) Also, Masterwork Dwarf Fortress allows the creation of metal clothing.

wear and unhappy thoughts still have some impact on FPS.

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). Accelerated Dwarf Fortress for v0.34.11







DFHack commands [ edit ]

A list of DFHack 0.34.11 r3 commands that can help with your framerate by fixing bugs and reducing items.

autodump Useful for mass dumping or destroying items. Use help autodump for options.

Useful for mass dumping or destroying items. Use for options. cleanowned Confiscates and dumps garbage owned by dwarfs. Use help cleanowned for options. Can cause unhappy thoughts if no replacement clothing is available.

Confiscates and dumps garbage owned by dwarfs. Use for options. Can cause unhappy thoughts if no replacement clothing is available. clean and spotclean Removes contaminants from tiles/units/items or one tile. Bug:296 Bug:1750 Bug:3270 help clean for options.

and Removes contaminants from tiles/units/items or one tile. for options. flows Counts map blocks with flowing liquids, which slow the game down.

tweak stable-temp Removes jitter in temperature updates. Bug:6012 fix/stable-temp apply Fixes existing item temperature jitter bugs.

Removes jitter in temperature updates. tweak fast-heat Further improves temperature update performance.

tweak fix-dimensions Fixes subtracting small amount of thread/cloth/liquid from a stack. Must be enabled every time DFHack is launched. fix/cloth-stockpile Fixes existing bugs in thread/cloth stockpiles. Bug:5739

Fixes subtracting small amount of thread/cloth/liquid from a stack. Must be enabled every time DFHack is launched.

fix/fat-dwarves Stops fat dwarves causing lag. Bug:5971

Stops fat dwarves causing lag. fix/item-occupancy Fixes invisible items. Bug:895





fastdwarf 0 1 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 [ edit ]

Spotlight indexes files on your mac. Since DF constantly changes files, spotlight will keep indexing them using 60-70% of your CPU. Exclude DF in system preferences: spotlight's privacy settings (by dragging the save folder into the list or pressing the + button) and you can get a factor of two in FPS. This can easily provide benefits of over 30 FPS, even on multicore computers that do not need to worry about CPU. This is due to the fact that DF is not multi-threaded in any significant way.

Note that excluding the save folder from Spotlight means you can't use Spotlight or Finder to search through the raw files. If you need to for some reason, you can use "find" from the command line for this.