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 5273 times)

Aussiemon

  • Bay Watcher
  • Well... now what?
    • View Profile
Re: FPS saving embark
« Reply #15 on: July 18, 2011, 04:29:43 pm »

A few things I'd recommend that might (they used to work at least) help:

-Always use ramps, not stairs

-Build a small trench with 3/7 water in it at the entrances to major tunnels in your fort. Contaminants are brutal on fps

-Go for a small or pocket world with a minimal amount of history, world size used to and still might have an effect on fps

-Use dfcleanmap often (part of the dfhack library)

-Change the init to make the dwarf fortress process a higher priority

-Perhaps get gamebooster?

-Lastly, a few versions back it was said that changing "normal" traffic square costs to 1 would improve fps. This still might work. The game looks for the cheapest path to take for a dwarf, so this may reduce travel time. Take it with a grain of salt though
Logged
"Don't worry about the world coming to an end today. It's already tomorrow in Australia."

Urist_McArathos

  • Bay Watcher
  • Nobody enjoys a good laugh more than I do.
    • View Profile
Re: FPS saving embark
« Reply #16 on: July 18, 2011, 06:55:31 pm »

A few things I'd recommend that might (they used to work at least) help:

-Always use ramps, not stairs

-Build a small trench with 3/7 water in it at the entrances to major tunnels in your fort. Contaminants are brutal on fps

-Go for a small or pocket world with a minimal amount of history, world size used to and still might have an effect on fps

-Use dfcleanmap often (part of the dfhack library)

-Change the init to make the dwarf fortress process a higher priority

-Perhaps get gamebooster?

-Lastly, a few versions back it was said that changing "normal" traffic square costs to 1 would improve fps. This still might work. The game looks for the cheapest path to take for a dwarf, so this may reduce travel time. Take it with a grain of salt though

All this is excellent advice.

If you're not above using cheater-type mods, I'd advise also using dfliquids to spawn your magma, obsidian, and water sources.  Moving liquids are brutal on FPS, and moving magma is even worse since it must recalculate temperature as it moves, in ADDITION to the already-consuming liquid movements.  Dig out trenches and resevoirs, then fill them with water.  Dig out single-square holes and fill them with magma for your magma forges (you'll have to actually discover magma in game before you can build magma forges, remember).  Power generation is another big FPS drain in larger projects, so stick with windmills if you can, or limit the scale of your massive projects.

I cannot over-emphasize how important traffic zones can be to FPS.  Something as simple as designating your main tunnels as high traffic alone can have a major impact over time.  Follow Jurph's advice for some really good results:

Make your fortress super-dense and use traffic zones, and you'll greatly reduce the cost of pathfinding.  Here are some things I've done that can help...
  • Use a vertical stack of 15x15-tile squares (or 15-tile diameter circles if you're feeling clever) with a central shaft; once you hit 15 floors you have a cube with excellent pathfinding qualities.
  • Make the central shaft a high-traffic zone, and create a single tile high-traffic path from the stairs to each workshop.
  • Make the corners of the square floors (or the outer 2-3 radial tiles if using circles) low-traffic zones to push dwarves to use storage closer to the core.
  • Use cascading stockpiles so that each workshop's most useful inputs are delivered to the squares around a workshop by peons (so your high-value workers spend less time shuttling back and forth looking for raw materials)
  • Place a forbidden door over the entrance to any exploratory shaft that is not currently in use -- this cuts all of that volume out of the search space.
  • Designate a ten-tile-long, single-tile-wide hallway of "RESTRICTED" space pathing into the exploration mines so that any item available in the main fortress will be found by A* before the algorithm starts to consider anything in the mines.
  • Place a "base camp" just above each cavern layer that includes a tiny amount of food, booze, and a bed in a sealed dining/bedroom.  Send your exploratory miners down into the depths, turn off labors besides mining, and forbid the door behind them.  Open the base camp for business.

Basically your goal should be to minimize the search space for A* pathfinding, and wherever possible use traffic designations to help it seek the most likely spots. 
Logged
Current Community/Story Projects:
On the Nature of Dwarves

Kilroy the Grand

  • Bay Watcher
  • I only want to give you a small kiss
    • View Profile
Re: FPS saving embark
« Reply #17 on: July 18, 2011, 08:02:42 pm »

you should simplfy bodies, remove all the teeth, fingers, and any other useless body parts
Logged
*pew* *blam* "Aughgghggurglegurgle..." *slither* *slither* *pit* *pat* *tap* *click-click* *BOOM* "Aiiieeegurgle gurgle..."
X-com meets Dwarf Fortress

billybobfred

  • Bay Watcher
  • [PRONOUN: she:her:hers:herself]
    • View Profile
Re: FPS saving embark
« Reply #18 on: July 18, 2011, 09:03:05 pm »

If we're talking about worldgen FPS optimization, a smaller world apparently has less lag.
Logged
urist mcgeorg, who lives in boatmurdered and makes over 10,000 bad decisions each day,

andyman564

  • Bay Watcher
  • Professional Lurker
    • View Profile
Re: FPS saving embark
« Reply #19 on: July 18, 2011, 09:08:45 pm »

If we're talking about worldgen FPS optimization, a smaller world apparently has less lag.

spot on. a pocket world has less things to calculate than a large one, so small worlds = faster world gen.

though i think the OP is talking about fortress mode FPS boosts. i'd recommend using traffic zones, keeping the clutter to a minimum, butchering strays, and keeping all pets confined to a pasture 
Logged
Yeah.  Thus why I didn't make a trap.  In it's current state the fortress didn't need a trap, the whole damn fortress is a trap.

Pan

  • Bay Watcher
    • View Profile
Re: FPS saving embark
« Reply #20 on: July 18, 2011, 09:10:03 pm »

you should simplfy bodies, remove all the teeth, fingers, and any other useless body parts

How will we gouge out eyes, pinch limbs off, or bite anyone's legs off like that?
Logged

Urist_McArathos

  • Bay Watcher
  • Nobody enjoys a good laugh more than I do.
    • View Profile
Re: FPS saving embark
« Reply #21 on: July 18, 2011, 09:11:24 pm »

If we're talking about worldgen FPS optimization, a smaller world apparently has less lag.
...i think the OP is talking about fortress mode FPS boosts. i'd recommend using traffic zones, keeping the clutter to a minimum, butchering strays, and dropping all pets into magma ASAP

Fixed it for you.
Logged
Current Community/Story Projects:
On the Nature of Dwarves

Pan

  • Bay Watcher
    • View Profile
Re: FPS saving embark
« Reply #22 on: July 19, 2011, 05:06:23 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.
Logged

Jurph

  • Bay Watcher
  • Minister of Belt-fed Weaponry
    • View Profile
Re: FPS saving embark
« Reply #23 on: July 19, 2011, 02:40:03 pm »

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)
« Last Edit: July 20, 2011, 07:14:30 am by Jurph »
Logged
Dreambrother has my original hammer-shaped Great Hall.  Towerweak has taken the idea to the next level.

Pan

  • Bay Watcher
    • View Profile
Re: FPS saving embark
« Reply #24 on: July 19, 2011, 05:22:13 pm »

Oooooooh. That clears it up at last on how these traffic zones work. Thanks.
Logged

billybobfred

  • Bay Watcher
  • [PRONOUN: she:her:hers:herself]
    • View Profile
Re: FPS saving embark
« Reply #25 on: July 19, 2011, 06:15:28 pm »

If we're talking about worldgen FPS optimization, a smaller world apparently has less lag.

spot on. a pocket world has less things to calculate than a large one, so small worlds = faster world gen.
Obviously, but I've been told it cuts lag in fortress mode as well.
Logged
urist mcgeorg, who lives in boatmurdered and makes over 10,000 bad decisions each day,

GreatWyrmGold

  • Bay Watcher
  • Sane, by the local standards.
    • View Profile
Re: FPS saving embark
« Reply #26 on: July 19, 2011, 08:29:18 pm »

High-traffic areas everywhere help, and don't require dorftime or resources to set up, but are tedious.

If you want an efficient fort, place spare staircases around, use advanced stockpile options, cluster workshops around stockpiles, have a few dedicated haulers, and don't be afraid to quantum dump.
Logged
Sig
Are you a GM with players who haven't posted? TheDelinquent Players Help will have Bay12 give you an action!
[GreatWyrmGold] gets a little crown. May it forever be his mark of Cain; let no one argue pointless subjects with him lest they receive the same.

jasonwill2

  • Bay Watcher
  • newbie coming into his own
    • View Profile
Re: FPS saving embark
« Reply #27 on: November 12, 2011, 05:20:04 am »

how do you turn off the temperature and weather to reduce lag? 

edit: also is there a way to lower my pop cap  after world gen?
« Last Edit: November 12, 2011, 05:22:19 am by jasonwill2 »
Logged

kaenneth

  • Bay Watcher
  • Catching fish
    • View Profile
    • Terrible Web Site
Re: FPS saving embark
« Reply #28 on: November 12, 2011, 05:54:20 am »

The biggest FPS killer I've found is having to much designated for too many.

Dwarves do not look for jobs to do, Jobs look for dwarves to do them.

Only designate small areas at a time, particularly for plant-gathering or tree-cutting, sigging seems a little smarter in that tile with not access don't look for workers, but a large work-face area will kill FPS as well.

The fewer pending jobs to sort through, the faster.
Logged
Quote from: Karnewarrior
Jeeze. Any time I want to be sigged I may as well just post in this thread.
Quote from: Darvi
That is an application of trigonometry that never occurred to me.
Quote from: PTTG??
I'm getting cake.
Don't tell anyone that you can see their shadows. If they hear you telling anyone, if you let them know that you know of them, they will get you.

MonkeyHead

  • Bay Watcher
  • Yma o hyd...
    • View Profile
Re: FPS saving embark
« Reply #29 on: November 12, 2011, 05:59:17 am »

Temp and weather off is in the init files. This makes the biggest difference for me in FPS. PopCap can also be changed in there, but works in a slightly less than inuitive manner.
Logged
This is a blank sig.
Pages: 1 [2] 3