Bay 12 Games Forum

Please login or register.

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

Author Topic: FPS saving embark  (Read 5331 times)

RabidAnubis

  • Bay Watcher
    • View Profile
Re: FPS saving embark
« Reply #30 on: November 12, 2011, 11:32:26 am »

New question - Will walling off caverns from my fortress speed up FPS? Or making a door and forbidding it, and then setting the entire cavern to 'Restricted' traffic zone.

Short answer: YES. 

Medium answer: Don't bother designating large swaths of restricted pathing; it doesn't buy you much.  Designating high-traffic paths through large open spaces saves you far more FPS.

Long answer: A* (basically!) works by extending a large number of invisible tentacles out from the dwarf, like a root system seeking water.  Each invisible tentacle represents one possible path the dwarf could take while trying to get to the object in question.  The algorithm maintains a set of tentacles of equivalent cost-length, and increments the tentacles' cost-lengths at the same time.  When a tentacle hits a restricted area, that tentacle incurs the entire cost (say 25) at once, and stops growing until the other tentacles have all incurred 25 steps of cost as well.

So if your dwarf is standing in my hypothetical 15-tile-cube fortress, and all the travel costs are either normal or high-traffic, then the very worst case travel distance is 35 and the worst-case cost is probably 60 or 85.  If you have a single-tile shaft leading to your exploratory mining areas / caverns, you can place four consecutive Restricted tiles (cost = 25 each) and make any trip to the caverns more expensive than the longest possible trip within the fortress.  There are upsides and downsides to this.  The upside is that a dwarf inside the cube will never have to search outside the cube for anything he can get within the cube; conversely, any dwarf in a cavern smaller than a 2x2 embark (!) will almost certainly search the entire cavern area before he tries to search the cube.  Again, this is accomplished by locking down four tiles to raise their cost to 100.

If you wall off the caverns, no tentacle can ever reach them... but if you're taking my advice from above, no tentacle should ever need to search those areas unless there is something that is uniquely available in the caverns.

If your dwarves do need to scour the caverns you can use burrows, base camps, and high-traffic paths with restricted gutters (basically three parallel paths of RES/HT/RES) which will shuttle dwarves to the most useful areas like mineral veins, water sources, or flat areas with lots of silk and cavern life.  Using traffic zones to build "rails" in this way can save a bunch of pathfinding costs when you want a dwarf to take a predefined path through a large open area.  This is because the tentacles that try to go off the path are severely penalized, and so the more productive tentacles can look 25x further without the CPU bothering to expand the nonproductive ones. 

(EDIT: cleared up some vague language)

This actually helped me a lot.
Logged
Dwarf Fortress: Your game is working on giving NPC's lives. Our game is working on giving them a working nervous system.
Aahhh I can't find the fish cakes in the bunny level, they keep getting enraged and I don't have any holy hand grenades
The Age of Myth: Goldenhold

Mickey Blue

  • Bay Watcher
    • View Profile
Re: FPS saving embark
« Reply #31 on: November 12, 2011, 12:43:32 pm »

These are the things I've heard, I have not tried them all nor do I know if they truly work or if they are just conventional wisdom but not actually based on any actual evidence (some mentioned already but just to be concise):

-Turn of Temperature and/or Weather (in the current incarnation of the fort some temperature doesn't work right already and unless you are in a freezing/very hot biome or are going to do a lot with magma it doesn't really matter a whole lot.  Same goes for weather, its neat but its not (IMO) worth a massive FPS hit.

-Try to make an efficient fortress without large areas for your dwarves to wander around (if you exploratory mine, once you are done wall it off for example).  Build wide hallways as well.

-Build ramps instead of stairs (just one I've heard from a ways back, don't know if it ever actually worked)

-Avoid flowing liquids (magma/water), do not use maps that have rivers/streams/etc.  Mastering aquifers helps a lot here cause you can have the benefits of water (more really cause its everywhere, literally) but don't have to worry about it constantly flowing. 

-Destroy random objects (clothes/goblinite/etc), this is another I've always heard but don't know if it actually helps. In addition slaughter or at least cage random creatures you have.

-Generate a smaller world and use a smaller embark zone (I generally use 2x2 embark zones and generate a medium (sometimes small, but sometimes small worlds don't generate enough enemies for me) world.

-In world gen set 'detailed history' to 'no'; again another one I've heard but cannot confirm

-Increase the priority of DF in windows task manager (no idea if this can be done with mac)


One FPS thing that can make things more tolerable but doesn't actually fix FPS.  I set my FPS max to 60 (as opposed to the default 100).  I initially did this cause I find the slightly slower movement and game more relaxing to play, however a side effect is that it takes longer to notice FPS drop because it has to get to the point it can no longer handle 60 for you to notice.

Lastly.. An option that works for me but also doesn't fix anything, make the game criminally hard :) If you do that you probably won't survive long enough to care much about FPS.  For example I don't use walls/gates, I don't use traps (save for sometimes hunting or for training), I don't use magma at all, I don't use the danger room exploit, and I use Fortress Defense II (a mod that greatly increases the amount of sieges as well as the amount of enemies ranging from easy-ish to incredibly difficult).  I'd rather die from my fort being crushed under the weight of dozens, if not hundreds, of enemies than die a slow, boring, FPS death.
Logged

RabidAnubis

  • Bay Watcher
    • View Profile
Re: FPS saving embark
« Reply #32 on: November 12, 2011, 01:09:10 pm »

These are the things I've heard, I have not tried them all nor do I know if they truly work or if they are just conventional wisdom but not actually based on any actual evidence (some mentioned already but just to be concise):

-Turn of Temperature and/or Weather (in the current incarnation of the fort some temperature doesn't work right already and unless you are in a freezing/very hot biome or are going to do a lot with magma it doesn't really matter a whole lot.  Same goes for weather, its neat but its not (IMO) worth a massive FPS hit.

-Try to make an efficient fortress without large areas for your dwarves to wander around (if you exploratory mine, once you are done wall it off for example).  Build wide hallways as well.

-Build ramps instead of stairs (just one I've heard from a ways back, don't know if it ever actually worked)

-Avoid flowing liquids (magma/water), do not use maps that have rivers/streams/etc.  Mastering aquifers helps a lot here cause you can have the benefits of water (more really cause its everywhere, literally) but don't have to worry about it constantly flowing. 

-Destroy random objects (clothes/goblinite/etc), this is another I've always heard but don't know if it actually helps. In addition slaughter or at least cage random creatures you have.

-Generate a smaller world and use a smaller embark zone (I generally use 2x2 embark zones and generate a medium (sometimes small, but sometimes small worlds don't generate enough enemies for me) world.

-In world gen set 'detailed history' to 'no'; again another one I've heard but cannot confirm

-Increase the priority of DF in windows task manager (no idea if this can be done with mac)


One FPS thing that can make things more tolerable but doesn't actually fix FPS.  I set my FPS max to 60 (as opposed to the default 100).  I initially did this cause I find the slightly slower movement and game more relaxing to play, however a side effect is that it takes longer to notice FPS drop because it has to get to the point it can no longer handle 60 for you to notice.

Lastly.. An option that works for me but also doesn't fix anything, make the game criminally hard :) If you do that you probably won't survive long enough to care much about FPS.  For example I don't use walls/gates, I don't use traps (save for sometimes hunting or for training), I don't use magma at all, I don't use the danger room exploit, and I use Fortress Defense II (a mod that greatly increases the amount of sieges as well as the amount of enemies ranging from easy-ish to incredibly difficult).  I'd rather die from my fort being crushed under the weight of dozens, if not hundreds, of enemies than die a slow, boring, FPS death.

It can be increased in MAC, via the .init file.  I just did it like a few minutes ago.  I'm going to see how it works on HIGH instead of NORMAL.
Logged
Dwarf Fortress: Your game is working on giving NPC's lives. Our game is working on giving them a working nervous system.
Aahhh I can't find the fish cakes in the bunny level, they keep getting enraged and I don't have any holy hand grenades
The Age of Myth: Goldenhold
Pages: 1 2 [3]