Why is Dwarf Fortress a huge resource hog

dwarf-fortresstechnical-issues

When I'm playing Dwarf Fortress my CPU usage is near 100%. This limits the usage of other applications when I alt-tab out of the game. Why does the game require so much processor usage? Is there a way to turn down some options to reduce the processor usage?

Best Answer

When talking about Dwarf Fortress, it sometimes helps to not think of the game as a game, but more like a simulation. The game simulates a lot of things behind the scenes, some of which are very computationally intensive. For instance:

  • Pathfinding - Every unit on the map - not only your dorfs, but also animals, pets, enemies does pathfinding to to keep track of where they're going
  • Fluids - The game simulates flowing fluid's velocity, pressure and depth, as well as generating mists when they fall over several z-levels
  • Temperature - When having Fun with magma and fire, the game keeps track of temperature of each individual tile and object, melting and setting them on fire when necessary
  • Body parts - During combat, parts as small as individual fingernails are simulated and taken into account when combatants engage in biting, stabbing and chopping

In addition to the above, DF is mostly single threaded - the main simulation thread usually runs on one CPU core, while the secondary graphics thread runs on another. This means that DF usually does not see significant speedup with modern, multicores processors.

To reduce CPU usage, first cap your FPS below the maximum you usually get, then improve performance by disabling some of the simulation elements mentioned above. Magmawiki has a good article about maximizing FPS that should help you.