Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: What causes FPS death?  (Read 722 times)

Mr. Palau

  • Bay Watcher
    • View Profile
What causes FPS death?
« on: June 27, 2013, 03:28:24 pm »

Items, too many pathing creatures, or something more sinister?
Logged
you can't just go up to people and get laid.

BoredVirulence

  • Bay Watcher
    • View Profile
Re: What causes FPS death?
« Reply #1 on: June 27, 2013, 04:00:53 pm »

For me, open spaces with lots of pathing creatures. 1-2fps on a 16x16 embark with 500 dwarves. 500 dwarves on a 4x4 embark gives me about 80.
Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: What causes FPS death?
« Reply #2 on: June 27, 2013, 04:04:37 pm »

NWKotaku did a rather intensive investigation into this issue. Let me see if I can find it.
Logged

kyle902

  • Bay Watcher
    • View Profile
Re: What causes FPS death?
« Reply #3 on: June 27, 2013, 04:06:12 pm »

Migrant pets usually cause my FPS death when they start breeding.

Thus I usually slaughter them and atomsmash their remains unless I need food.
Logged

TripJack

  • Bay Watcher
    • View Profile
Re: What causes FPS death?
« Reply #4 on: June 27, 2013, 04:10:26 pm »

pathfinding is the big killer

temperature and flow are smaller killers
Logged

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: What causes FPS death?
« Reply #5 on: June 27, 2013, 04:11:32 pm »

The short version is that the more creatures you have on your map, the slower things will be.  Moving creatures take up more than idle creatures since the game has to compute and monitor path finding information for them, but all creatures contribute.

Items have a secondary effect: the more you have the slower the game goes.  You have to get very, very large numbers of items to start noticing a big impact from them though.  Regardless, many players, myself included, try to destroy or trade away useless items (like invader clothing).

Liquid flows can contribute a lot to slowdown.  This includes moving water and magma / lava, but it's an especially big problem if it's spreading out, filling something or moving across z-levels (such as water falls).  I believe the game is optimized to prevent most of the computations if it's an uninterrupted river moving to a map edge.

Finally, having a large map in any dimension (even z-levels) can slow the game down quite a bit.  This is for various reasons, such as the caverns contributing to the above problems, but temperature calculations and various other tile related calculations will get slower with a larger map.  I believe this primarily matters if you have lots of unrevealed tiles, since I think the game keeps unrevealed sections of the map abstract until it needs to load them for the more complex calculations.
Logged
Through pain, I find wisdom.

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: What causes FPS death?
« Reply #6 on: June 27, 2013, 04:20:11 pm »

Found it. (Finally!)

Here is NW_Kohaku's very comprehensive exploration of FPS death causes, and remedial activities to mitigate or correct the problem.

Aka, Operation FPS BOMB
Logged

Mr. Palau

  • Bay Watcher
    • View Profile
Re: What causes FPS death?
« Reply #7 on: June 27, 2013, 08:18:41 pm »

So, tell me if I got it all right:
-dead creatures cause lag
-Items cause lag
-Destroyed items do not cause lag
-Stockpiles cause lag

did I miss anything from the thread? Or anything outside of it, besides pathfinding?

Also, does open space really cause lag?
Logged
you can't just go up to people and get laid.

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: What causes FPS death?
« Reply #8 on: June 27, 2013, 08:21:58 pm »

Not open space specifically.  Allocated map causes it.  Until you dig down, or build up, the game does not allocate memory for that part of the map. This is why undiscovered cavern systems don't kill the FPS, but once "found", they can bring a system to its knees. Especially if there is flowing water.

Open space from mining is allocated map space.
Logged

Sergarr

  • Bay Watcher
  • (9) airheaded baka (9)
    • View Profile
Re: What causes FPS death?
« Reply #9 on: June 28, 2013, 04:30:21 am »

For me, open spaces with lots of pathing creatures. 1-2fps on a 16x16 embark with 500 dwarves. 500 dwarves on a 4x4 embark gives me about 80.
The fact that you have 80 fps with 500 dwarves.... give that computer back to NASA!
Logged
._.