Bay 12 Games Forum

Please login or register.

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

Author Topic: Low FPS, good fort  (Read 2317 times)

Daniel Charms

  • Bay Watcher
    • View Profile
Re: Low FPS, good fort
« Reply #15 on: April 01, 2008, 11:33:00 am »

I had a fortress with a population of 140. Then I wanted to see if I could wipe them all out - and nearly succeeded: after two years of starvation, I had managed to reduce the population to 7. Framerate only improved by 5 or 6 fps, though - for 15-16 to 20-22.
Logged

Deathworks

  • Bay Watcher
  • There be no fortress without its feline rulers!
    • View Profile
Re: Low FPS, good fort
« Reply #16 on: April 01, 2008, 11:55:00 am »

Hi!

quote:
Originally posted by Daniel Charms:
<STRONG>I had a fortress with a population of 140. Then I wanted to see if I could wipe them all out - and nearly succeeded: after two years of starvation, I had managed to reduce the population to 7. Framerate only improved by 5 or 6 fps, though - for 15-16 to 20-22.</STRONG>

I would believe that this actually goes with my observation. Unless you do not have any stockpiles, graveyards and/or coffins in your fortress, each one of the dwarves you killed created dozens of hauling jobs (each item of equipment, each corpse, each body part ripped off during the tantrum...). With your work force decimated and those still alive busy catching vermin, none of these jobs got handled, simply clogging up your system. Add to this all the cleaning jobs for all the blood (I remember my first 2D fortresses and how they looked after a winter of starvation).

If my guess is correct and you still have that save around, you might experiment with undesignating all stockpiles - after some delay as all those jobs get cancelled (you do need at least one dwarf ready and willing to work, of course), I would expect your framerate to increase drastically.

Deathworks

Logged

Flok Speargrabber

  • Bay Watcher
    • View Profile
Re: Low FPS, good fort
« Reply #17 on: April 01, 2008, 04:35:00 pm »

quote:
Originally posted by pushy:
<STRONG>How many animals have you got running around loose? Try caging or butchering them. That'd help your FPS by cutting CPU cycles used up by the pets' AI   :)</STRONG>

70 trained, 40 untrained... Not much I can do, either, since all the untrained are pets.

Logged

Spike GT

  • Bay Watcher
  • Dwarf Philosopher
    • View Profile
Re: Low FPS, good fort
« Reply #18 on: April 01, 2008, 06:56:00 pm »

Let me tell you about a fortress I had once.  I had dug out two 3x3 up/down staircases that penetrated all the way to the bottom z-level of the delve, and then I made five-space wide corridors coming out in all four cardinal directions from these, going all the way to the edges of the map.  The result was that they would intersect in two places, and I ended up with more ore than I could process for a very long time, which was neat.

The problem was that at a certain point during mining, the game got unbearably lagged, so I cleared out three of the 15+ z-levels of worthless stone I had by dumping it into my rock crusher, a small drawbridge with a garbage dump activity zone under it, linked to a lever for instant destruction of crap I didn't want.

After all the dumping and crushing of these three z-levels, I still didn't have a very good framerate, and so I figured maybe it was because the dwarves and other creatures were running pathfinding checks on all the mined squares, as out-of-the-way as they were.  So I walled them off, but left a space for a door on each of the four walls of my up/down staircases, which I locked when they were built.

FPS got a lot better, but apparently I mined too close to the edge of the map, and to my very tragic chagrin, goblin thieves and, eventually a siege full of bowmen, spawned in the open areas underneath my fortress, to plunder and slay with near total impunity before I could check them, which was only possible by taking enormous losses of military and civilian dwarves.

So I took out all the doors and just walled everything off.  Ran a lot better after that, and no nasty surprises.

Oh yeah, I almost forgot another problem with FPS that made a big difference.  I  had a volcano in that fortress, and while heat wasn't slowing down my FPS noticeably before all that mining, it was also a cause of a big chunk of my problems.  A friend explained that heat flow takes up a lot of cycles, just like water and magma flow.

Logged

Shakkara

  • Bay Watcher
    • View Profile
Re: Low FPS, good fort
« Reply #19 on: April 02, 2008, 05:51:00 am »

It seems to me that vertical fortresses generate a lot more lag than horizontal ones.

I had workshops with stockpiles above and below them, accessible by a single stairway somewhere in the middle of them. Lag galore, but if I build the piles on the same level it seems to run a lot smoother. Probably it tries to run for the item first but then has to make a different path to find the closest stairs first and then go after the item from there.

Logged

RogerN

  • Bay Watcher
    • View Profile
Re: Low FPS, good fort
« Reply #20 on: April 02, 2008, 11:00:00 am »

I suspect that vertical fortress designs suffer from extreme pathfinding slowdowns due to chokepoints.  In other words, there are large sections of your underground fort which are only accessible via a single staircase, or a single door, or something like that.

Basically, whenever the game tries to find a path from inside your mines to something outside (i.e. wood hauling job, or something similar) it must search a lot of underground space before it finally finds the exit to the surface.  The problem is exacerbated by vertical designs because the pathfinding heuristic (assuming Dwarf Fortress uses A* pathfinding algorithm) is more likely to be wrong (i.e. the destination is west, but your dwarf must first travel east in order to exit the mines).

I would guess that you could alleviate this problem making sure that you have good connectivity in your fortress.  Make lots of entrances and exits, spaced evenly so that there are fewer chokepoints for moving around in the fort, and for moving between inside and outside.

Of course, having lots of entrances means that your fort is extremely difficult to defend... so you'll have to create a huge wall, moat, or some other natural obstacle that encompasses all of your entrances.  For example, you might wall off the entire map except for a 15-tile strip at the edges (so that sieges don't spawn inside your wall, and you can force them through a common gate).

Logged
Pages: 1 [2]