Bay 12 Games Forum

Please login or register.

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

Author Topic: Moving forward (one frame at a time)  (Read 1823 times)

der_elvenfrage

  • Bay Watcher
    • View Profile
Moving forward (one frame at a time)
« on: July 12, 2012, 06:09:26 pm »

I've been playing DF for a while, now, and I'm currently ~3.5 years and ~90 dwarfs into one of my more successful forts. A meager but thus-far adequate military program, a brand new, secondary fort underway just above the magma sea, food/drink stockpiled to last for years (meal rot an occasional nuisance), ~2.5M dwarfbucks net worth and plenty of trade goods for the forseeable future. A bright future.

Except for that one line in the corner which reads "12 FPS".

I've tried especially hard this time around to be pro-active with FPS management -- built my first serious atom-smasher and put it to constant use, gave away a ton of crap to the caravans, designated traffic zones, etc. Disabling temperature&weather has a limited effect (adds ~10 FPS, at this point), and could probably buy this fort another year or two of growth. The effect of traffic control is negligible (my forts are mostly vertical, with very few mining shafts or open areas-- I think pathing is as efficient as it will ever get).

I suspect it is the sheer number of items on the map that is responsible for the majority of my FPS woes, but at full employment already for my 90 dwarfs and 10-12 FPS (or 18-24 with temperature off), I don't see how I will ever clean this fort back down to bare necessities. There's always more shit to haul to the dump. So fcuk it, I'll massacre them and start a new one. A cleaner one.


So, what I want to ask you is: How do YOU manage your fort's clutter / FPS? How do you know how many socks is too many socks? What tricks have you learned to expedite your dumping projects, combat packratism, and postpone the inevitable?
Logged

peskyninja

  • Bay Watcher
  • Natural de-selector
    • View Profile
Re: Moving forward (one frame at a time)
« Reply #1 on: July 12, 2012, 06:15:26 pm »

Disable temp, attomsmashing doesn't work.
Logged
Burn the land and boil the sea. You can't take the sky from me

Thou son of a b*tch wilt not ever make subjects of Christian sons; we have no fear of your army, by land and by sea we will battle with thee, f**k thy mother.

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Moving forward (one frame at a time)
« Reply #2 on: July 12, 2012, 07:01:28 pm »

attomsmashing doesn't work.
Actually, I'm pretty sure it works just fine - I've run tests on incredibly laggy fortresses, and marking every item for garbage collection (equivalent to atomsmashing) causes a significant FPS boost. You just have to destroy a lot of items.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

krenshala

  • Bay Watcher
    • View Profile
Re: Moving forward (one frame at a time)
« Reply #3 on: July 12, 2012, 07:26:15 pm »

Remember, just being vertical doesn't change the pathfinding at all.  You have to limit the number of possible paths for the mob to take to improve the FPS.  If there is only one valid path from any two given points in your fortress, even if it isn't an "efficient" path, you will get more efficient pathfinding results.  Having multiple paths, even if only on is "efficient" and the rest are obviously bad choices will still hurt due to the extra checks required.

You mentioned temperature being turned off.  That should only affect you when temps change.  The other half of that is water/magma movement, since it can simetimes cause temperature checks (e.g., build your magma pump stack in the right order and it only does temp checks at the top and bottom, not in between, improving FPS due to lack of extraneous temperature checks).  It has to check the fluid flow/movement regardless, however.
« Last Edit: July 12, 2012, 07:28:21 pm by krenshala »
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!"

der_elvenfrage

  • Bay Watcher
    • View Profile
Re: Moving forward (one frame at a time)
« Reply #4 on: July 12, 2012, 07:49:41 pm »

By being vertical, I only meant to say that the distances between any 2 points were generally shorter and less complicated than they would be if everything were on just a few levels, and that 80% of any given path will be along the main stairwell. I'm curious, though -- by this logic, should traffic designations do any good for FPS, at all, since they don't reduce the number of _possible_ paths, just the weights when choosing among the available ones? Seems like only building walls and forbidding doors would have a marked effect on pathfinding efficiency.

I usually like to leave temperature on, because A) magma gets nerfed without it and B) seasons won't effectively change without it  -- if it's off when you embark and the ground is covered in snow, get ready for a long winter (which, incidentally, can help FPS a lot more, since surface plants/trees will never spawn). Under the circumstances, though, that's worth the extra 10-12 FPS gain.
Logged

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Moving forward (one frame at a time)
« Reply #5 on: July 12, 2012, 08:04:00 pm »

... You have to limit the number of possible paths for the mob to take to improve the FPS.  If there is only one valid path from any two given points in your fortress, even if it isn't an "efficient" path, you will get more efficient pathfinding results.  Having multiple paths, even if only on is "efficient" and the rest are obviously bad choices will still hurt due to the extra checks required....

A* pathfinding does not work the way you think it does.

Possible paths doesn't matter if you dig hallways correctly and use traffic designations correctly.

EDIT:
- minimize distances between common destinations (food, drink, sleeping, meeting hall, trade depot) and widen hallways between these locations.
- designate main hallways and staircases as high traffic zones.
- designate dead ends as low/restricted traffic zones, or wall them off. Doesn't matter usually, except if they are misleading (i.e. dwarf wants to go to surface, but paths up a dead-end staircase instead).
- designate rooms that are between major hallways as low traffic zones, because pathing will try to cut the corner and explore the room, because it looks to be a shorter route.

A* Pathing always tries to go depth-first in the direction of the destination, until it hits a obstacle, provided tile cost is 1 (high traffic). Normal (2) cost tiles cause problems, and sometimes reducing the normal cost to 1 will improve FPS and pathing.
« Last Edit: July 12, 2012, 08:12:44 pm by Urist Da Vinci »
Logged

krenshala

  • Bay Watcher
    • View Profile
Re: Moving forward (one frame at a time)
« Reply #6 on: July 12, 2012, 09:50:28 pm »

Ah, you are correct.  I made some uninformed assumptions.  Checking a couple of the videos on it, and I see why my fort designs tend to work well, even if its not for the reasons I thought it was. ;)
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!"

Replica

  • Bay Watcher
  • Temp. leave of absence
    • View Profile
Re: Moving forward (one frame at a time)
« Reply #7 on: July 12, 2012, 09:52:11 pm »

DFhack is your friend.

Clean
Autodump
Autodump Destroy Here
Autodump Destroy Item
Logged
Quote from: tahujdt
I don't know about unicorns, but back in .95, one of my PA soldiers was diagnosed with power armor. I drew a fairly good picture about it, but my science project (a bunny) pissed all over it.
Fallout: Equestria - Index of Stable Reports x Fallout: Equestria - Orange

hjd_uk

  • Bay Watcher
    • View Profile
Re: Moving forward (one frame at a time)
« Reply #8 on: July 13, 2012, 06:42:22 am »

Another note : Forbidding doors to a contained area also removes the tiles form pathfinding - at least as far as i can tell due the the short pause as the pathfinding system updates itself when you fobid/unforbid doors.

So if yo udont want to wall off areas completly you can just put in doors and forbid them.
Logged

Xob Ludosmbax

  • Bay Watcher
    • View Profile
Re: Moving forward (one frame at a time)
« Reply #9 on: July 13, 2012, 10:39:50 am »

What I would do to get rid of stones is z -> stocks -> stones, then select all of the stone types I don't want from there.  Followed by autodump & destroy.  Sometimes I would autodump into a pile, unforbid and remark the pile for dumping, then manually unmark a few stones so I would still have 30 microcline left for levers.  -- I've since modded stones to be a lot less common, combined with DF2012, so I actually ran out of stone once. 

Point being, the stocks menu is great for clearing useless items. 

(I eventually started autodumping into some unused corner first in case I had stuff still marked to be dumped from before.)

toomanysecrets

  • Bay Watcher
  • Jackpot.
    • View Profile
Re: Moving forward (one frame at a time)
« Reply #10 on: July 13, 2012, 11:14:34 am »

I didn't see anyone mention GFPS setting. This has a huge impact on FPS (for me).  I set mine to about 8 with negligible effect on gameplay.  On a big fort with a lot of slowdown, I will lower it to as low as 3 or 4 and this will keep large fortresses cruising at about 30-40 FPS on a 5-year old machine.
Logged

ThrashDorf

  • Escaped Lunatic
    • View Profile
Re: Moving forward (one frame at a time)
« Reply #11 on: July 13, 2012, 03:41:12 pm »

GFPS setting ... can you elaborate a little?

I definitely see improvement when using 'cleanowned' and 'autodump' with DFHack. I didn't use it forever because it felt a little cheaty to me, but I like all the sim elements of the game except the 'Clean Your Fort' simulator that tends to go into play a couple years into an embark.

Other things I do to increase FPS:

I've quit making so much junk. I will craft only what I need, and don't sweat giving the caravans good deals
(except the elves, I haggle their useless caravans to the copper). I atom smash and donate, and I also have quit using the 3x3 central stairway design. I use a 3x1 ramp and have seen much higher FPS with 200 dwarves, 100+ animals, invaders, etc. all running around the map. I have also set my max dwarves to 150, and max children to 30 (still end up with over 200 citizens, too), and have kept my embarks to a 3x3 grid.

I  set my stockpiles to use bins for junk items, and have separate stockpiles without any bins allocated for Artifacts and Masterwork items. Makes trading so much easier. I also don't sweat having idlers once I'm well enough established. I see it as a sign of accomplishment to get to the point I can have 30 idlers and still crank out all the food, drink, and items my fort might need.

While I've maintained higher FPS this way, my uber forts always seem to become a slideshow at some point. Or get close enough I basically shelve them. It's too bad, too, as I see the natural progression in the game at this point is to either crack the candy for some good times, or to go raid/conquer/annihilate neighboring civilizations. Perhaps one day the code will be optimized better, but computers will probably be able to chew through it before that day comes.
Logged

toomanysecrets

  • Bay Watcher
  • Jackpot.
    • View Profile
Re: Moving forward (one frame at a time)
« Reply #12 on: July 13, 2012, 04:13:55 pm »

GFPS=Graphical frames per second. You can change it in "init.txt"
Logged

der_elvenfrage

  • Bay Watcher
    • View Profile
Re: Moving forward (one frame at a time)
« Reply #13 on: July 13, 2012, 05:24:39 pm »

Oh, I had completely forgotten about dfhack's clean & autodump. This will definitely help in the future.

I had my G_FPS capped at 30, but I guess that doesn't do any good if my overall FPS is even lower. I could definitely benefit from reducing G_FPS, at this point.
Logged

toomanysecrets

  • Bay Watcher
  • Jackpot.
    • View Profile
Re: Moving forward (one frame at a time)
« Reply #14 on: July 13, 2012, 07:43:27 pm »

It will give you a FPS boost no matter the size of the fortress. It's not like the FPS cap. GFPS is how many times the game refreshes the graphics on the screen every second. Lowering it frees up CPU power even if you just embarked.
Logged
Pages: [1] 2