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.

23a:Maximizing framerate

From Dwarf Fortress Wiki
Revision as of 19:14, 10 December 2019 by Silverwing235 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
This article is about an older version of DF.

Dwarf Fortress is an extremely CPU-intensive application that currently requires a fast, modern machine (recommendations). The objective of this page is to help you reduce game lag, a crippling problem for many players.

OpenGL[edit]

  • If framerate is extremely slow with an otherwise CPU-friendly fortress and a decent machine, your graphic card's interaction with the OpenGL code used by the game may be at fault. Updating your drivers usually works; you may also have to adjust some settings in your graphic card's control software, such as turning vertical synchronization off.

Flowing Liquids[edit]

Operating any device which causes water or magma floods will cause significant lag until the liquid finishes expanding or drying up. Most notably, trying to flood the world with magma can bring an otherwise speedy fortress to its knees in mere moments.

Game options[edit]

In the folder "\data\init" is a file named "init.txt". Edits to this file can greatly increase game speed. Keep backups for safety and to save yourself having to re-enter values every time you upgrade.

Parameter Effect Speed Improvement
[SOUND:OFF] Disables sound. Slight increase in speed.
[FPS:YES], [FPS_CAP:100]: Handy indicator of how fast your game is running.
[TEMPERATURE:NO]: Turns off temperature greatly increases speed. It also kills off some rather nice lava warming effects, stops rivers from freezing and (importantly!) thawing, makes glacial maps less interesting, and prevents sudden deaths from exposure. You're well-advised to stick with "warm" or "hot" fortress sites if you turn temperature off and your source of water is a stream.
[WEATHER:NO]: Turns off weather increases speed noticeably.
[POPULATION_CAP:40]: Keep your population under control to prevent the game bogging down. Pathfinding for numerous dwarves can bring even a fast machine to its knees.

Fortress layout and gameplay[edit]

  • Narrow paths and bottlenecks cause the pathfinding algorithm to repeatedly recompute a faster route for each dwarf (and pet) as the paths empty and clear. Use large hallways to connect any two spots where lots of dwarves will want to be.
  • Keep wandering pets and wild animals to a minimum and cage livestock. The AI for all of these has become more efficient of late and each one costs much less CPU time than a dwarf, but sheer numbers matter.
  • Avoid designating very large areas for chopping, gathering, detailing, or mining, especially if many dwarves do these things.
  • Some observers suspect that having massive numbers of objects in stockpiles also impacts FPS; others believe any effect is minor[Verify]. Food stockpiles seem to be the worst offenders; if your fortress overproduces food, you may see a progressive slowdown even if your population and pathing complexity don't change.
  • Blocking off areas of the fortress entirely - especially (only?) with removable obstacles like drawbridges or forbidden doors - causes serious problems with pathfinding.

Non-factors[edit]

The following things don't have a significant effect on game speed, at least as tested.

  • Fullscreen or windowed (if OpenGL settings are compatible with the game)
  • Use of custom graphics sets, choice of graphics tileset
  • Size of tiles

Hardware- and OS-specific Advice[edit]

Dual Processors[edit]

  • Go into task manager and set the affinity of Dwarf Fortress to one processor, and then set all the programs that use significant resources to the other. Most programs do not use more than one processor and the best use of a dual processor is to let DF have one to itself. This is not recommended for laptop computers, which will switch between processors as a heat management technique. Pinning to one processor will cause the processor to start slowing down instead.
  • Vista's START command can be used to set affinity with the /AFFINITY switch, so basically you can create a shortcut and you won't need to set affinity manually.

Laptop computers[edit]

  • Frame rate is higher when running off mains power. This is because laptops reduce CPU performance to extend the battery life.
  • You can disable that feature in MS Windows, at the expense of the battery running out much more quickly.
  • Some laptops may overheat if you run Dwarf Fortress for too long, keep your laptop cool if you find that after a while FPS suddenly drops. (This is due to CPU throttling intended to prevent possible damage from heat building up.)

Dual monitors[edit]

  • Display DF entirely on one screen (no overlap to the second screen whatsoever).

See also[edit]