Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Help with FPS  (Read 3159 times)

em1LL

  • Bay Watcher
    • View Profile
Help with FPS
« on: January 14, 2015, 04:37:08 pm »

Hi all!

What FPS do you have in the fort you are currently playing?

I have 2x2 embark in the large world with standard history, 52 dwarves, no water flows (so no rivers / brooks / waterfalls / etc), three underground layers and magma sea, about 50 non-caged animals and it gives me about 30 FPS. Is it ok? I have a lot of food btw, maybe I should atom-smash it. Not sure what is the real bottleneck of such low FPS (animals / food / etc).

I read a lot of stuff around here about avoiding FPS death but I already did a bunch of it -- set max limit of dwarves, chose smallest embark location without any water flows and killed a lot of animals.

How can I increase FPS in my case? Can somebody help me with this?

Here is my save file -- https://www.dropbox.com/s/tvy0ouq8q9vdoqt/region6.zip?dl=0

I'm using 0.40.23 btw.

Any help is appreciated.

Thanks in advance.
Logged

GhostDwemer

  • Bay Watcher
    • View Profile
Re: Help with FPS
« Reply #1 on: January 14, 2015, 05:17:00 pm »

Playing the latest Masterwork, with 139 dwarves in a ten year old fortress with TONS of goods, I'm getting 50-60 FPS. Now, I have only four thousand drinks and two thousand prepared meals, while you have sixteen thousand and six thousand, but I also have FAR more other crap than you do, as Masterwork has more stuff in it.

Running your fortress, I get 40FPS. Turning the default graphics cap down from 50FPS to 30FPS boosts the sim speed up to 60FPS, but this is still pretty bad for such a small fort. I blame the multiple HUGE open areas. Do you really need to dig out entire z levels?
Logged

Numeroid

  • Bay Watcher
  • Back after a long hiatus.
    • View Profile
Re: Help with FPS
« Reply #2 on: January 14, 2015, 05:21:43 pm »

I believe turning off weather and temperature can help FPS, so that's worth looking into.
Logged

em1LL

  • Bay Watcher
    • View Profile
Re: Help with FPS
« Reply #3 on: January 14, 2015, 06:11:51 pm »

Turning the default graphics cap down from 50FPS to 30FPS boosts the sim speed up to 60FPS, but this is still pretty bad for such a small fort

Can you tell me more about this option? Why does it help in this case?

Quote
I blame the multiple HUGE open areas

I have open areas in the caverns only. Are you talking about it? Or do you mean by "open areas" just a huge halls? If so, does it really affect perfomance?

Quote
Do you really need to dig out entire z levels?

I tried to get more stone. However these levels isn't open (there's walls around them), am I wrong?
Logged

em1LL

  • Bay Watcher
    • View Profile
Re: Help with FPS
« Reply #4 on: January 14, 2015, 06:12:43 pm »

I believe turning off weather and temperature can help FPS, so that's worth looking into.

Will I notice any serious gameplay differences in this case?
Logged

Numeroid

  • Bay Watcher
  • Back after a long hiatus.
    • View Profile
Re: Help with FPS
« Reply #5 on: January 14, 2015, 06:49:32 pm »

Will I notice any serious gameplay differences in this case?

On your save, I was getting a pretty consistent 30 FPS with weather and temperature on. After turning them off, I gained, at worst 5 FPS and at best 15 FPS.
Logged

Ancalagon_TB

  • Bay Watcher
    • View Profile
Re: Help with FPS
« Reply #6 on: January 14, 2015, 07:02:07 pm »

having a short history and a smaller world improves FPS a bit if I am not mistaken?
Logged
hamster cheese supplies are low

omega_dwarf

  • Bay Watcher
  • Adequate Architect, Dabbling Modder
    • View Profile
Re: Help with FPS
« Reply #7 on: January 14, 2015, 07:47:01 pm »

Set G_FPS cap to 10. Turn temp off. That's about all you can do. Traffic designations, if well-placed, can help a ton in some forts. Especially if you have wide hallways.

GhostDwemer

  • Bay Watcher
    • View Profile
Re: Help with FPS
« Reply #8 on: January 14, 2015, 10:13:25 pm »

Dwarf Fortress is a single threaded application. It is also very memory intensive. Also, it is not a 3D program. 3D applications can offload a lot of graphics processing to the card, 2D applications can't really, they need to generate the image in memory and then transmit it to the card. But DF needs to be using its memory bandwidth for its own purposes. And the constant bit shuffling means you will be suffering cache misses, where the processor has to grab data from slower main memory, much more frequently.

The FPS cap is for the world simulation frames per second. The graphics FPS cap is for how often the picture of the world gets updated and sent to your GPU. The processes of updating the world and udpating the graphical picture of the world are in direct competition for your computer's scarce resources. Because this is not a fast action game, you don't need to update the picture of the world as frequently. It won't look any more jumpy or jerky than it already does!

By "open areas" I don't mean they are open at the edges, I mean they are open in the middle. Because of the way that computers figure out the way from point A to point B (an algorithm called A+ or A*) having many equally valid paths from any point A to any point B means more possible paths to check. Do I go north, then east, then up; or do I go up, then east, then north, or do I go... you get the picture? More ways to go means more ways to check, conversely, more restrictions on travel means less paths to check, every millisecond, for every creature.

You'd get better FPS from a 3x3 or even 4x4 embark that didn't have all those mined out areas. However, you can fix it easily, after you get what you want, shut off the access. A locked door or constructed wall in the right place will block the pathfinding algorithm, meaning it has less work to do. If your dwarves no longer need to get somewhere, make sure they can't or they will constantly be wondering if they should, via the pathfinding algorithm.
Logged

catastrophy

  • Bay Watcher
    • View Profile
Re: Help with FPS
« Reply #9 on: January 15, 2015, 04:10:21 am »

Dwarf Fortress is a single threaded application. It is also very memory intensive. Also, it is not a 3D program. 3D applications can offload a lot of graphics processing to the card, 2D applications can't really, they need to generate the image in memory and then transmit it to the card. But DF needs to be using its memory bandwidth for its own purposes. And the constant bit shuffling means you will be suffering cache misses, where the processor has to grab data from slower main memory, much more frequently.

The FPS cap is for the world simulation frames per second. The graphics FPS cap is for how often the picture of the world gets updated and sent to your GPU. The processes of updating the world and udpating the graphical picture of the world are in direct competition for your computer's scarce resources. Because this is not a fast action game, you don't need to update the picture of the world as frequently. It won't look any more jumpy or jerky than it already does!

By "open areas" I don't mean they are open at the edges, I mean they are open in the middle. Because of the way that computers figure out the way from point A to point B (an algorithm called A+ or A*) having many equally valid paths from any point A to any point B means more possible paths to check. Do I go north, then east, then up; or do I go up, then east, then north, or do I go... you get the picture? More ways to go means more ways to check, conversely, more restrictions on travel means less paths to check, every millisecond, for every creature.

You'd get better FPS from a 3x3 or even 4x4 embark that didn't have all those mined out areas. However, you can fix it easily, after you get what you want, shut off the access. A locked door or constructed wall in the right place will block the pathfinding algorithm, meaning it has less work to do. If your dwarves no longer need to get somewhere, make sure they can't or they will constantly be wondering if they should, via the pathfinding algorithm.

Where is the like button lever? I want to press pull it.
Logged

Authority2

  • Bay Watcher
  • [ETHIC: INCREASE_FPS: REQUIRED]
    • View Profile
Re: Help with FPS
« Reply #10 on: January 15, 2015, 06:25:13 am »

Actually, dwarves path in straight lines in sufficiently open areas. It's only when you have tight labyrinths and twisty halls that they need to go tile by tile to find the way through.
Logged
"But I tell you what the Queen wants is impossible. The story of her mandate to create floodgates in our desert fortress cannot be told in less than 314160 stanzas! Art bows not to any dwarf!"

GhostDwemer

  • Bay Watcher
    • View Profile
Re: Help with FPS
« Reply #11 on: January 15, 2015, 01:28:15 pm »

Sure, they path in straight lines in open areas, but what is the pathfinding algorithm actually doing? Is it only checking the path they take, or is it checking multiple paths? Well, it depends.

Lets say we have three fully mined out areas on adjacent z-levels, with a central stairwell. Without special tricks, which DF may or may not be using, the program has no way of knowing that the stairway is the only way up or down.

Lets say you want to get from the lower south east corner to the upper north west corner of this mined out area. At a glance, a person can tell that we go northwest until we reach the stairwell, then up, then northwest. A computer can't do this, it has no way of knowing, until it checks, that the central stairwell is the only access point between z-levels. In what order do we check the various possible paths? When it reaches the stairs, will the pathfinding algorithm go up first, or northwest first? It may go northwest, to a point directly under the point it wants to get to, then go "Oh! there's no stairs up here, I need to back track."

To put it more simply, just because dwarves move in a straight line in open areas does not mean that this was the only path they considered taking.
Logged

omega_dwarf

  • Bay Watcher
  • Adequate Architect, Dabbling Modder
    • View Profile
Re: Help with FPS
« Reply #12 on: January 16, 2015, 12:49:34 am »

Actually, dwarves path in straight lines in sufficiently open areas. It's only when you have tight labyrinths and twisty halls that they need to go tile by tile to find the way through.

Are you sure that the algorithm actually jumps in straight lines through open areas, and that it doesn't just result in a straight path? I know there are algorithms that are smart enough to leap along straight paths when there are no obstacles, without going all A* and flooding the room, but I was not under the impression that DF had implemented such a thing.

Naryar

  • Bay Watcher
  • [SPHERE:VERMIN][LIKES_FIGHTING]
    • View Profile
Re: Help with FPS
« Reply #13 on: January 16, 2015, 02:44:19 am »

Turn temperature and weather off, and then wall off unneeded areas of your fort so pathfinding doesn't take as many FPS as before.

Eldin00

  • Bay Watcher
    • View Profile
Re: Help with FPS
« Reply #14 on: January 16, 2015, 02:49:41 am »

I loaded up your save (in 0.40.24), and I believe I may have found a culprit for your low FPS that nobody else has commented on. You have a forgotten beast made of flame in the first cavern that is running around continually setting fires. Fires (and the resulting smoke) have been observed to have a noticeable impact on FPS in the past, and I presume that is still the case.
Logged
Pages: [1] 2