Bay 12 Games Forum

Please login or register.

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

Author Topic: Looking for framerate and workspeed improvements  (Read 2982 times)

Bomepie

  • Bay Watcher
    • View Profile
Looking for framerate and workspeed improvements
« on: January 08, 2014, 11:47:50 am »

Once again I have started a mega-project, and I'd like to make sure I have things running as quickly as possible.

Currently I have a few tasks going on:
  • Keeping the fortress moderately functional
  • Trading for iron and steel
  • Butchering migrant waves (Need to hit about 1k butchered)
  • Using blocks to build a 100z level cast (30k stone or so)
  • Building a 100z level 5 pump magma pumpstack
  • Building a 120z level 5 pump water pumpstack

Here's some general info:
  • Right now the permanent pop is hovering at 75, with about 50 of those being dedicated to construction and hauling.
  • I'm not using any minecarts because I haven't learned how to use them. I do have a few wheelbarrows assigned to the stone stockpile though.
  • Invasions have been disabled due to them leaving shit everywhere, a squad of 10 axe/sword-lords is still sitting around training though.
  • I'm not using any fancy dumping, aside from designating huge swaths of stone so they're brought up next to the workshops every once in a while
  • Temperature is currently ON (which is why I need iron for my pumpstack)
  • I'm willing to use DFHack as long as it doesn't invalidate the core concepts of the project.

I'm looking for general advice on how to streamline my building processes and improve framerate. As well as specific advice on how to keeping up with food and clothing demands without causing huge amounts of junk to build up (especially the clothing, is there a DFHack command to make all xClothingx instantly rot? how bout goblin bodyparts?).



Logged
Megadorf™ A giant dwarf shaped dwarf fortress

The All Guardsmen Party

itg

  • Bay Watcher
    • View Profile
Re: Looking for framerate and workspeed improvements
« Reply #1 on: January 08, 2014, 12:12:06 pm »

A couple of ideas:

  • It might be worth it to you to armor all your dwarves. It's a one-time investment so you won't have to worry about old clothing anymore. You can use cleanowned to get rid of that old clothing
  • You can turn off temperature when you don't absolutely need it. You'll have to turn it back on for a little while after casting obsidian, if you want your dwarves to walk on it.
  • Edit: I don't know about making clothing/body parts instantly rot, but you probably wouldn't feel bad about using 'autodump destroy'. It does what you'd think it does.


VerdantSF

  • Bay Watcher
    • View Profile
Re: Looking for framerate and workspeed improvements
« Reply #2 on: January 08, 2014, 12:56:15 pm »

Good advice, but regarding clothes, make sure to have a few pieces on hand for any children, miners, and woodcutters.  Children can't wear armor at all, while miners and woodcutters will remove designated armor when perform the mining or woodcutting jobs.

jcochran

  • Bay Watcher
    • View Profile
Re: Looking for framerate and workspeed improvements
« Reply #3 on: January 08, 2014, 02:23:04 pm »

The pump stacks you mentioned cause me to wonder.

Why are you needing 5 pump wide stacks? I suspect that the reason you want all that is to improve throughput to a reasonable level since a single width pump stack does have a rather ... anemic ... flow rate. But there's a method where you can improve your throughput so that your stack is pumping a 7/7 tile of fluid each tick. And you don't need to have all those pumps running in parallel.

The general method is to have multiple pumps at the bottom most level of the stack, all pushing fluid towards the source for the next Z level up. If don't properly, the stack will then have 7/7 always available.

Although for water, there is trick that works just as effectively, but doesn't require multiple pumps at the bottom. What that trick is is having a cistern at the very bottom of the stack with an opening at the bottom of the cistern that floods the input tile. Doing do requires that you seal off access to the pump (else pressure mechanics will cause a heck of a lot of flooding). As long as there's 2 or more z levels of water in the cistern, the water stack will do 7/7 every tick.
 
Logged

Maolagin

  • Bay Watcher
    • View Profile
Re: Looking for framerate and workspeed improvements
« Reply #4 on: January 08, 2014, 02:58:29 pm »

  • It might be worth it to you to armor all your dwarves. It's a one-time investment so you won't have to worry about old clothing anymore. You can use cleanowned to get rid of that old clothing
Using cleanowned is probably worth it even if you don't want to go to the trouble of armoring everyone. In one fairly old fort I was able to boost my FPS by 30-40% just by using it to sweep thousands of worn socks and whatnot out of the bedrooms into a single quantum stockpile.
Logged

Bomepie

  • Bay Watcher
    • View Profile
Re: Looking for framerate and workspeed improvements
« Reply #5 on: January 08, 2014, 03:07:53 pm »

Ok I've read up on autodump and that seems like it's exactly what I need to get rid of extra clothes on the ground. If there's not any downside to throwing all dwarves into inactive squads and armoring them then I'll go ahead and do that, I have copper to spare.

I'll turn off temperature until it's time to begin casting I guess, hopefully I won't mess up any of the magma pumps and only find out when I turn it back on.

As for the pumpstacks I was planning to have them in a bank of 5 with a spacer block between each one. The fluid tank for each level would be 9x2 with floodgate's along the walls that face the cast. My theory was to either build it at the same time as I cast, or deactivate the pumps above the level I'm casting. You're making it sound like it's worth it to beef up the bottom layer to make sure as much as possible gets pushed into the layers above it.

Honestly I'm a little worried about the volcano and aquifer not supplying magma and water fast enough to keep the pumps at full capacity now...
Logged
Megadorf™ A giant dwarf shaped dwarf fortress

The All Guardsmen Party

jcochran

  • Bay Watcher
    • View Profile
Re: Looking for framerate and workspeed improvements
« Reply #6 on: January 08, 2014, 07:08:20 pm »

What I'm talking about is that instead of having 5 pumps stacks, you have 1 pump stack with a beefed up input. Uses a lot less materials and time and you will not believe how much fluid a single pump stack pumps when it's kept fully loaded.

One thing I've discovered while performing obsidian casting that you might find of interest.

1. If you completely fill a layer with magma, then on the Z level above, fill with water, you'll get a perfect obsidian casting on the level you filled with magma.
2. If you completely fill a layer with water, then on the Z level above, fill with magma, unfortunately, the casting won't go so well. What will happen is you'll get a rather spotty layer of obsidian with pockets of magma randomly scattered throughout.

Because of #2, making a large obsidian casting is a rather annoying process.
« Last Edit: January 08, 2014, 07:15:08 pm by jcochran »
Logged

itg

  • Bay Watcher
    • View Profile
Re: Looking for framerate and workspeed improvements
« Reply #7 on: January 09, 2014, 03:19:31 am »

Ok I've read up on autodump and that seems like it's exactly what I need to get rid of extra clothes on the ground. If there's not any downside to throwing all dwarves into inactive squads and armoring them then I'll go ahead and do that, I have copper to spare.

Leather would be preferable, since copper will slow down your dwarves somewhat. Also, don't bother fully armoring everyone. Just give them something to cover the torso, legs, and feet, so they don't go insane.

Bomepie

  • Bay Watcher
    • View Profile
Re: Looking for framerate and workspeed improvements
« Reply #8 on: January 09, 2014, 11:33:03 am »

One thing I've discovered while performing obsidian casting that you might find of interest.

1. If you completely fill a layer with magma, then on the Z level above, fill with water, you'll get a perfect obsidian casting on the level you filled with magma.
2. If you completely fill a layer with water, then on the Z level above, fill with magma, unfortunately, the casting won't go so well. What will happen is you'll get a rather spotty layer of obsidian with pockets of magma randomly scattered throughout.

Because of #2, making a large obsidian casting is a rather annoying process.

So even if the layer is 7/7 water magma starting on the level above it won't evenly solidify the layer?

On the matter of pumping throughput: how fast have you seen a beefed up single pumpstack go? I'm looking at casting around 150k units of obsidian here. The bottom 30 or so layers are all going to be massive 50x44 regions. I was figuring that a single tile of entry would restrict the flow too much, hence the 9 wide entry point.

Leather would be preferable, since copper will slow down your dwarves somewhat. Also, don't bother fully armoring everyone. Just give them something to cover the torso, legs, and feet, so they don't go insane.

So leather ARMOR correct? Not clothing?
Logged
Megadorf™ A giant dwarf shaped dwarf fortress

The All Guardsmen Party

AWellTrainedFerret

  • Bay Watcher
  • An Axe Knight draws near!
    • View Profile
Re: Looking for framerate and workspeed improvements
« Reply #9 on: January 09, 2014, 11:50:08 am »

As mentioned, a single pump stack is sufficient for any size  cast so long as the very bottom pump is fully supplied at all times. When built in the proper order, a pump stack moves a 7/7 tile of liquid from the bottom all the way to the top every single tick. To make sure it remains consistent, I usually have the single pump at the bottom of the stack feed by at least 5 pumps all into the single input square. Also of note: I advise digging down to the magma sea instead of trying to tap a magma pipe, because even though the pipes replenish, they replenish very slowly.

Logged
The Axe Knight attacks before you are ready!
The Axe Knight chants the spell of SLEEP!
Thou art asleep.
Pepare'th thine anus.
Axe Knight hath no lube.

Bomepie

  • Bay Watcher
    • View Profile
Re: Looking for framerate and workspeed improvements
« Reply #10 on: January 09, 2014, 12:07:52 pm »

Do you have a link to how the replenishment works? I'd really rather not add another 50-100 levels to my pumpstack if I can avoid it.
Logged
Megadorf™ A giant dwarf shaped dwarf fortress

The All Guardsmen Party

AWellTrainedFerret

  • Bay Watcher
  • An Axe Knight draws near!
    • View Profile
Re: Looking for framerate and workspeed improvements
« Reply #11 on: January 09, 2014, 12:44:04 pm »

The wiki doesn't provide a rate at which pipes are replenished and suggests that it's random. I don't know the exact rate either, but I can tell you from personal experience that even a single pump can out-due the replenishment rate. It really depends on just how much magma you need, whether or not you need a constant supply, and how often you intend to tap it. For a large project, the magma sea is a much better bet unless you want to wait years for the pipe to refill.
Logged
The Axe Knight attacks before you are ready!
The Axe Knight chants the spell of SLEEP!
Thou art asleep.
Pepare'th thine anus.
Axe Knight hath no lube.

jcochran

  • Bay Watcher
    • View Profile
Re: Looking for framerate and workspeed improvements
« Reply #12 on: January 10, 2014, 04:40:54 pm »

So even if the layer is 7/7 water magma starting on the level above it won't evenly solidify the layer?

On the matter of pumping throughput: how fast have you seen a beefed up single pumpstack go? I'm looking at casting around 150k units of obsidian here. The bottom 30 or so layers are all going to be massive 50x44 regions. I was figuring that a single tile of entry would restrict the flow too much, hence the 9 wide entry point.

Exactly. Water being flowed over the top of magma = Good casting. Magma being flowed over water = Spotty casting.
As for your 50x44 regions, think about it. That's only 2200 tiles. Given that a properly made pump stack will supply 7/7 per tick. That means 2200 ticks. Assuming you have a fps of 100, that's a mere 22 seconds. (Lower fps of course will result in slower filling). As for a single tile being "too restrictive", that's nonsense.

As for someone else suggesting that you use the magma sea and avoid magma pipes, that's questionable. Frankly, magma pipes make one of the best rapid flow sources of magma out there. There are three mechanisms in which a "natural body" of fluid moves from place to place within dwarf fortress. I'm going to call them
1. Pressure mechanics.
2. Flow mechanics.
3. Gravity mechanics.

Pressure mechanics is the fastest method. But in general, it only applies to water. If you have 2 or more Z levels of fluid "stacked" on top of each other, you can tap into the lower layer and draw off fluid. And what you draw off will be INSTANTLY REPLACED by fluid existing at a higher Z level as rapidly as you can draw it off until there is no more fluid available on a higher Z level. Pressure mechanics is why I tend to dig my water cisterns at the bottom of the water pump stack. It lets me maintain 7/7 flow per tick for quite a while, without requiring multiple feeder pumps.

Flow mechanics is what happens with unpressurized fluid moves over a horizontal distance. It's very slow and quite feeble. This is unfortunately, the primary method of magma flow. You suck out some magma via a pump and the magma needs to be replaced via flow mechanics before more magma is available to be pumped. Painfully, painfully slow.

Gravity mechanics is simple. Namely if you have a stack of fluid (say like that in a magma pipe), and you take from fluid from the bottom, the fluid above will fall and instantly replace what was taken.

So with a magma pipe, you can take advantage of gravity mechanics to make the distance that flow mechanics has to work over very very short.

Here are a few screenshots of my magma supply under construction.
Spoiler (click to show/hide)

In any case, when those pumps start working, they're gonna empty the tiles they pump from, and those tiles will be replenished over a distance of only 2 via flow mechanics because gravity mechanics will keep those tiles within the magma pipe proper at 7/7. And a distance of 2 with all those other tiles filled to 7/7 isn't too bad for flow mechanics.
 
Logged

Reelya

  • Bay Watcher
    • View Profile
Re: Looking for framerate and workspeed improvements
« Reply #13 on: January 11, 2014, 12:47:14 pm »

Do you have a link to how the replenishment works? I'd really rather not add another 50-100 levels to my pumpstack if I can avoid it.
Pipes gradually refill, slowly, as stated. Magma sea squares on the edge of the map are considered to always be next to 7/7 magma (the "off-screen" square outside the map), similar to water in ocean squares.

It really depends how much magma you need: if you need a whole lot, and tap into the bottom of a volcano, and you pump fast, eventually the magma pipe will empty out, despite the gravity ensuring there's always 7/7 at the input, eventually the level of the volcano will be too low.

If you have a deep magma sea, it'd be best to tap near the edge of the screen, in a place where there are as many open edge tiles as possible, so there will be constant magma flow from off-map, and start the tapping as low as possible. This gives you a source that's impossible to empty.
« Last Edit: January 11, 2014, 12:54:43 pm by Reelya »
Logged

krenshala

  • Bay Watcher
    • View Profile
Re: Looking for framerate and workspeed improvements
« Reply #14 on: January 11, 2014, 01:07:02 pm »

Just in case you weren't aware, the best way to build the stack is from the top down, as the pumps are evaluated in the reverse order in which they were built.  e.g., build pumps A, B, C, D and E, in that order, and the game pumps with E, then D, then C, B, and A, in that order.  This is how you can pump a full 7/7 of water or magma the entire height of the pump each tick (assuming the bottom-most pump is always pulling from a 7/7 tile, of course).

Also, I remember a thread about how to build a pump stack that kept all the tiles surrounding it at the correct temperature so you could leave temperature on while pumping  and not have to worry about the lag from the game recalculating temps in each tile as the pump-stack did its work.  I don't remember who started that thread, however, as it was close to a year ago.
Logged
Quote from: Haspen
Quote from: phoenixuk
Zepave Dawnhogs the Butterfly of Vales the Marsh Titan ... was taken out by a single novice axedwarf and his pet war kitten. Long Live Domas Etasastesh Adilloram, slayer of the snow butterfly!
Doesn't quite have the ring of heroics to it...
Mother: "...and after the evil snow butterfly was defeated, Domas and his kitten lived happily ever after!"
Kids: "Yaaaay!"
Pages: [1] 2