Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: FPS improvements  (Read 1269 times)

pkrums

  • Escaped Lunatic
    • View Profile
FPS improvements
« on: December 24, 2016, 08:06:26 pm »

In my opinion, Dwarf Fortress is the greatest game ever made. However, if you want to play with 200 dwarves and all of the features, the speed of the game is almost so slow as to make it not enjoyable. Keep in mind, I would like to play out a fortress for multiple GENERATIONS of dwarves, which wouldn't be too hard with the starting speeds, but as the number of interactions increases exponentially (?), it's simply not possible. Toady's code is not public domain, but perhaps letting users specify memory and CPU restrictions and investigating your data structures could yield improvements. I have a 2.2 GHz Intel core i7 processor (pretty basic), and DF seems to be maxing out the processor instead of the memory. Perhaps some "fuzzy" dwarf interactions could lead to an improvement.

Oh, and if this is already in discussion somewhere, please redirect me...

Specifically, I was thinking of a limit on the depth of calculations. Say, 3 calculations before a decision is made.

Or, here's a thought, maybe a time-step setting, where you can reduce your control over your fortress by less than retiring it while speeding up the game. You could have regular time steps at the beginning, and then lengthen them and perhaps control the kinds of announcements that pause the game.
« Last Edit: December 25, 2016, 12:40:26 am by pkrums »
Logged

Lubricus

  • Escaped Lunatic
    • View Profile
Re: FPS improvements
« Reply #1 on: December 25, 2016, 11:31:17 am »

The game is impressive fast I think it should be balanced for smaller fortresses instead. I don't see why it's better with 200 dwarfs than 40. The game should'd come with a flood of immigrants and the crafting should work with fewer dwarfs. I also think there is a little to much depth in the simulation of f.ex. dirt and contamination's that is just to CPU heavy.
Normal games try to fool you and look like more is going on than is true, dwarf fortress is the other way it's way more going on than most of the players have found out.
Logged

pkrums

  • Escaped Lunatic
    • View Profile
Re: FPS improvements
« Reply #2 on: December 26, 2016, 04:00:34 pm »

Cause with 200 dwarves you can occupy half of them with researching the secrets of life and death..........
Logged

Bradders

  • Bay Watcher
  • A creature fond of drink, incense and industry
    • View Profile
Re: FPS improvements
« Reply #3 on: December 29, 2016, 05:33:11 am »

Some of the biggest offenders for FPS-death are:
  • non-caged non-restrained pathing pets (particularly large drops using pet-forbidden doors), pathing errors stemming from narrow corridors, and too-wide passages offering too many options for packs of working dorfs
  • temperature calculations (as evidenced by the New Magma Pump Stack - adding an extra block of space on both sides of a single stack level's magma reservoir making a 'T', to every level, keeps magma/heat on every level and doesn't force the game to recalculate the temperature for every block adjacent to the stack every tick like non-expanded stacks do)
  • owned, scattered, decaying items that have to be 'aged' and register every frame, also contaminants/blood
  • moving fluids, or worse, mist, or even worse, a misty waterfall that you can't turn off.

You're definitely correct about DF being proc-locked, though I understand the 64 bit update is supposed to greatly ease things in this regard - I haven't yet updated past 43.03 though.  Some degree of fuzzy interactions would be a godsend for chunking some of these overly-frequently-checked tasks down to a reasonable amount of proc load time, especially on things that are checked constantly but affected infrequently, like clothing decay - clothes only go from normal to xItemx to xXItemXx to XXItemXX, but the integer value for their decay is kept and checked on every tick, for every article of clothing, for every dorf.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: FPS improvements
« Reply #4 on: December 30, 2016, 12:12:56 am »

clothes only go from normal to xItemx to xXItemXx to XXItemXX, but the integer value for their decay is kept and checked on every tick, for every article of clothing, for every dorf.
Where'd you hear that? I don't know about this one off the top of my head, but I know that a lot of periodic updates are run at larger intervals (every 20, 100, 500, etc. ticks).

Also, the 64-bit build is a little faster, but at most 10-20%.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

pkrums

  • Escaped Lunatic
    • View Profile
Re: FPS improvements
« Reply #5 on: December 30, 2016, 08:55:12 pm »

You know, if DF became multi-threaded, programming wouldn't necessarily have to worry about interactions between the threads. Because DF is a game with a steep learning curve that requires users to learn many features, you could have a quick manual about how threads interact, and then do something simple like separate each map into 4 quarters. Users could worry about the interactions as long as they are simple enough.
Logged

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: FPS improvements
« Reply #6 on: December 31, 2016, 05:02:02 am »

You know, if DF became multi-threaded, programming wouldn't necessarily have to worry about interactions between the threads. Because DF is a game with a steep learning curve that requires users to learn many features, you could have a quick manual about how threads interact, and then do something simple like separate each map into 4 quarters. Users could worry about the interactions as long as they are simple enough.
What happens if one unit is chasing another and it crosses the boundary? Not pretty.
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

anewaname

  • Bay Watcher
  • The mattock... My choice for problem solving.
    • View Profile
Re: FPS improvements
« Reply #7 on: December 31, 2016, 07:03:10 am »

Perhaps some "fuzzy" dwarf interactions could lead to an improvement.
The less-fuzzy dwarf and object interactions are the valuable, beautiful, and rare things, that DF brings to a gaming world that is... limited in those things.
Logged
How did I manage to successfully apply the lessons of The Screwtape Letters to my perceptions of big grocery stores?

MrWiggles

  • Bay Watcher
  • Doubt Everything
    • View Profile
Re: FPS improvements
« Reply #8 on: January 07, 2017, 01:00:09 am »

You know, if DF became multi-threaded, programming wouldn't necessarily have to worry about interactions between the threads. Because DF is a game with a steep learning curve that requires users to learn many features, you could have a quick manual about how threads interact, and then do something simple like separate each map into 4 quarters. Users could worry about the interactions as long as they are simple enough.
ToadyOne has said a few times that Multithreading wouldnt really improve the game performance much.

And the learning cliff in DF is a bit overstated. Its fairly easy to learn. The UI fights you a bit, but the basic things to learn arent a lot. The problem is that the game doesnt tell you what the bare minimum of things you need.
Logged
Doesn't like running from bears = clearly isn't an Eastern European
I'm Making a Mush! Navitas: City Limits ~ Inspired by Dresden Files and SCP.
http://www.bay12forums.com/smf/index.php?topic=113699.msg3470055#msg3470055
http://www.tf2items.com/id/MisterWigggles666#