Bay 12 Games Forum

Please login or register.

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

Author Topic: FPS woes  (Read 3115 times)

pugtm

  • Escaped Lunatic
    • View Profile
FPS woes
« on: January 21, 2016, 07:59:18 pm »

I've been playing for ages but recently i got a very powerful gaming rig. latest I7 3gb graphics card etc. i figured. finally i can play DF without crippling lag.
But alas, a decade in and a mere 147 citizens in and lag is completely crippling my fortress. I've turned off temps and weather and cave ins and pretty much everything else. keep auto-dumping trash under bridges. nothing doing. changing the video rendering has done nothing i have tried standard vbo and renderer, with absolutely no changes. Is there anything further to be done? how is it i can play BF4 on Ultra but a 2d game like this is this bad... Any help would be greatly appreciated.
Logged

Klitri

  • Bay Watcher
    • View Profile
Re: FPS woes
« Reply #1 on: January 21, 2016, 08:02:44 pm »

Doesn't really matter how much power you have, DF is more ram extensive. On top of that, it's not really optimized and not written for 64x OS. I suppose you'll just have to suffice with pocket world five year histories.
Logged
"A giant cave bat, a giant cave swallow, and a troll wander into my fort's cagetraps..."

pugtm

  • Escaped Lunatic
    • View Profile
Re: FPS woes
« Reply #2 on: January 21, 2016, 08:05:10 pm »

i have 16 gb of ddr3 ram, you are telling me that's not enough? plus my memory utilization right now is 25%. come on this has to be fixable or at least worked on.
Logged

MoonyTheHuman

  • Bay Watcher
  • I think the DEC VAX hates me.
    • View Profile
    • hellomouse
Re: FPS woes
« Reply #3 on: January 21, 2016, 08:13:06 pm »

without some utility for it, DF can only use 2gb of ram...

khearn

  • Bay Watcher
    • View Profile
Re: FPS woes
« Reply #4 on: January 21, 2016, 08:16:22 pm »

One issue is that high powered machines nowadays get their power from lots of cores, not high clock rates. This works great for modern, multi-threaded programs. Unfortunately, DF is single-threaded, so 16 cores gets you nothing. CPU manufacturers have pretty much hit the wall with regard to clock rates, so your very powerful gaming rig probably doesn't run DF any faster than a decent desktop. Your rig will handle multi-threaded stuff better (which is most games), but it's probably got about the same clock speed as a much cheaper computer with fewer cores.
Logged
Have them killed. Nothing solves a problem quite as effectively as simply having it killed.

Bwint

  • Bay Watcher
    • View Profile
Re: FPS woes
« Reply #5 on: January 21, 2016, 10:29:42 pm »

The hard drive also makes a huge difference. I'm playing on an Intel i7 laptop, and can easily reach 147 dwarves, temperature and cave-ins on, without crippling lag. The only difference I can think of is that I have an ssd, which can read much faster than a spinning disc. If you also have an ssd, then consider your fortress layout: Lots of open space and convoluted paths can hurt FPS like nothing else.
Logged
'There are some things mortals are not meant to know, but we were bored and drunk at the time so we gecided to leave details of those forbidden arts in the library for a laugh.'

Jigowah

  • Bay Watcher
    • View Profile
Re: FPS woes
« Reply #6 on: January 21, 2016, 11:26:30 pm »

I am not suffering from any of these FPS nightmares and I wonder if there is a gameplay behavior / condition that is responsible for your situation...

Perhaps you are simulating a lot of fluid dynamics by pushing around water or lava?  Perhaps some conficting zone / area / military order is causing you endless loops of processing?  Maybe there is a pathfinding error because of a locked door to the caves or some such?

It's complicated and I think sometimes the complexity of DF can just crush ANY computer if there is too much to simulate.
Logged

Shonai_Dweller

  • Bay Watcher
    • View Profile
Re: FPS woes
« Reply #7 on: January 22, 2016, 03:07:55 am »

Sometime later this cycle there's a 64 bit test version coming out. You'll be able to throw all 16GB of RAM at DF and see if it makes a difference (popular opinion is, it won't, but let's wait and see).
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: FPS woes
« Reply #8 on: January 22, 2016, 03:49:41 am »

An SSD disk should have a marginal effect on DF in fortress mode unless you have so little RAM that it has to be used to host a swap file, since DF loads the fortress into memory and thus doesn't use the HD during play.
There's a wiki page on FPS with some tips, but my experience is that you'll always get into trouble eventually. Trees and their products (i.e. scattered logs) seem to cause significant slowdowns when viewed, as do web covered caverns.
Logged

Orange Wizard

  • Bay Watcher
  • mou ii yo
    • View Profile
    • S M U G
Re: FPS woes
« Reply #9 on: January 22, 2016, 04:33:28 am »

Things you need to make DF less laggy (for a while):

CPU:
Single-core performance is a must here, not just clock speed. A 4.2 GHz processor can be easily outperformed by a newer 2.0 GHz one, depending on various factors. Don't just go for the one with bigger numbers.
Also note that while DF is (mostly) single-threaded, a multi-core CPU is still important, because the OS and anything else you're doing will want cores other than the one DF is on to run in the background. Good luck getting a modern CPU with only one core, though.

RAM:
DF doesn't use more than 2gb of RAM, and although that can be increased with the binary patch floating around somewhere, your computer will never need more than 4-8gb total for playing DF and background stuff.
The important factor in RAM is the connection speed. DF needs lots of stuff on-hand for its myriad calculations, more than what can fit in the processor cache, so it is constantly pulling stuff backwards and forwards from the RAM.

HDD/SSD:
A faster HDD or using and SSD will vastly speed up save/load times, but shouldn't have a noticeable effect on gameplay.

GPU:
DF barely uses the GPU at all. You might notice a dip in framerate if you're forcing the game to run on a single core with an integrated graphics chip, but in the vast majority of cases you're not going to need to worry about your graphics card.

...

In-game, there are a number of things you can do to boost framerate.

Map size is a factor. If you're generating large worlds, you can expect the game to run more slowly than small worlds. Similarly, if your embark area is larger or smaller, you'll also notice a change. History length is also a factor, but less so than other things.
The effect of these will vary from case to case, so you just need to experiment and see what you like best.

Population and creatures present will have a big impact on FPS. You can set the population cap in the init files, along with a cap on the number of invaders at any one time. Lowering the child cap is fairly popular, seeing as children are basically useless anyway.
Pathfinding (which is closely linked to population) is another big-hitter, but a little harder to mitigate. In general, keeping everything nearby to dwarves don't have to walk so far, and walling off unused sections of the fort will help reduce lag.

Every item on the map is ticked by the game, so trading, atom-smashing, or dumping in magma anything that isn't needed can potentially save you a huge number of frames.

Flowing water and magma will slow down the game enormously. Rivers don't seem to have much of an impact, but waterfalls and constructed water contraptions will wreak havok on your framerate.

...

I think that's about everything. Someone needs to make a more detailed guide on the wiki.
Logged
Please don't shitpost, it lowers the quality of discourse
Hard science is like a sword, and soft science is like fear. You can use both to equally powerful results, but even if your opponent disbelieve your stabs, they will still die.

deknegt

  • Bay Watcher
    • View Profile
Re: FPS woes
« Reply #10 on: January 22, 2016, 04:36:38 am »

i have 16 gb of ddr3 ram, you are telling me that's not enough? plus my memory utilization right now is 25%. come on this has to be fixable or at least worked on.

1: It's being worked on, like others have said, there will be a test version out in this development cycle.

Explanation:
Dwarf Fortress is a x86 (32-bit) programme. Without adding any fluff, any game/programme/system that runs on 32-bit can only handle a maximum of 3.4gb of RAM, never anything more. So it doesn't matter if you have 8, 16, 32, or even 64GB, there won't be any speed difference when you run something that's based on 32-bit. Another example is the operating system Windows XP, which also runs on X86 architecture, which means that XP doesn't utilize more than 3.4GB ever, even if you have more available. Many internet browsers have the same issue too.

Now you have 64 bit, which is the present and the future of system infrastructure and in extension programming. The x64 architecture has a theoretical ram limit running into the millions of terabyte. So it'll take a long time before we reach the limit...

But the problem is, Dwarf Fortress is an old game, it's been in development since 2002 and it was released in 2006, back when 4GB of ram was advanced, in the 10 years since then computers have grown faster than ever before, which means that the weaknesses of Dwarf Fortress are ever the more clear, and that technically speaking you can't 'win' more FPS now than you did back then, there are a few tricks out there, but in general throwing more RAM into your PC and getting a fancy i7 does not affect the game in any way.

Now as I've said, somewhere in the next dev-cycle Tarn wants to release a test-version running on 64-bit, which many of us are very hyped about because this could mean FPS-deaths might become a thing of the past, and maybe become extinct altogether (unless you cycle-pump every drop of magma back and forth the map or something insane like that).

But it's not as simply as just altering a few lines of codes, or flicking a switch, or changing an option here and there. We're talking about the infrastructure of the game itself, the building blocks. You can't simply start chipping away at the base of a house to replace it with newer stronger bricks. You need to do it one brick at a time to make sure the house doesn't topple over.

It takes time, and it's not an easy process.

TL;DR - There's not much a fancy PC will improve about DF's speed than a system that's 8 years old. Be patient, they're working on it.
Logged

Orange Wizard

  • Bay Watcher
  • mou ii yo
    • View Profile
    • S M U G
Re: FPS woes
« Reply #11 on: January 22, 2016, 04:44:40 am »

Making a 64-bit version of the game isn't going to be that huge an impact on FPS, really. Should be a decent improvement, but I can't see it being a cataclysmic end to lag like you're suggesting :P

Now, multithreading, on the other hand... will probably never happen because it involves to huge of a change to the game's structure, but it's a nice dream
Logged
Please don't shitpost, it lowers the quality of discourse
Hard science is like a sword, and soft science is like fear. You can use both to equally powerful results, but even if your opponent disbelieve your stabs, they will still die.

pugtm

  • Escaped Lunatic
    • View Profile
Re: FPS woes
« Reply #12 on: January 22, 2016, 06:01:19 am »

I will just reply, and i appreciate everyone's 5 cents here, and i did try all the tricks on the wiki, and the computer was bought for work/school,
 but i think, that maybe considering everyone's replies here a little more dev time might be placed into making the game playable/functional rather than minor adjustments to trees and culture gen. i've been playing the game on and off for 5 years. 5 years ago fps death was understandable. now... it's just frustrating.
especially without any possibility of remedy.
Logged

martinuzz

  • Bay Watcher
  • High dwarf
    • View Profile
Re: FPS woes
« Reply #13 on: January 22, 2016, 06:50:14 am »

I cannot say I am completely unsympathetic to your plea. It is really depressing that forts die FPS deaths on good rigs, except if you specifically bought a pc with as little cores as possible, with the highest speed single core prestations you could find, which is going to be crap for playing most other games. In reality, no one is going to do that except a few ultra rich kids who don't mind buying a second pc just for dwarf fortress.

I must say though that I get better FPS in 42.x than I did in 34.11 and 40.x, so it's not true that Toady One has not done anything at all to optimise things. My current 160 pop fort still gets 35-40FPS. In 34.11, it'd be 10-15 with that population. (For me personally, everything above 25 FPS is cool, 15-25 is slightly annoying, 10-15 YAWN GETTON WIDDID, below 10, too infuriating to play.)

EDIT: oh, side question: I've recently started using a usb 3.0 flash drive for readyboost. I could swear it has improved my ingame FPS a bit, but cannot make sense of why it would. https://en.wikipedia.org/wiki/ReadyBoost. I mean, it makes sense for it to decrease loading and saving times, but ingame FPS?
« Last Edit: January 22, 2016, 07:06:36 am by martinuzz »
Logged
Friendly and polite reminder for optimists: Hope is a finite resource

We can ­disagree and still love each other, ­unless your disagreement is rooted in my oppression and denial of my humanity and right to exist - James Baldwin

http://www.bay12forums.com/smf/index.php?topic=73719.msg1830479#msg1830479

Uggh

  • Bay Watcher
    • View Profile
Re: FPS woes
« Reply #14 on: January 22, 2016, 07:47:55 am »

Just a small additional hint; I experienced a big drop in fps after designating a pasture partly "hanging" in mid-air, i.e. above a small lake. Removing said pasture gave me back my former fps.
Logged
Pages: [1] 2 3