Bay 12 Games Forum

Please login or register.

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

Author Topic: "Using up stone" How does that REALLY work for fps?  (Read 9373 times)

tps12

  • Bay Watcher
    • View Profile
Re: "Using up stone" How does that REALLY work for fps?
« Reply #45 on: June 29, 2010, 01:02:49 pm »

Quote
With more than 5,000 stone there is a noticeable pause whenever I select the workshop. The workshop needs to decide what jobs it can show, and so it finds all items that it can potentially use, which is every stone that has ever been mined. With 15,000 stone its a full 1-2 second pause.

This kind of thing (similarly, the noticeable pause when a bunch of enemies or a caravan spawn, or when doors are forbidden or unforbidden) seems to cast doubt on the "pathfinding hurts FPS" conventional wisdom, IMHO.

Pathfinding is a relatively rare event in frame terms (creatures only get to do any action every couple or frames or so, and most of the time they are going to be moving along a path rather than calculating a new one), so while you can observe moments like this where a whole bunch of pathfinding jobs cause a noticeable little delay at a single point in time, it's not something that would manifest as a steady drag on FPS, I don't think.

I thought the theory behind item count hurting FPS was that the simulation needs to check all the objects in the game each frame to see if, e.g., it's hot enough for hunk of stone #419330 to melt or burst into flames or fall through the air or whatever.

But yeah, in general I'm pretty skeptical about a lot of the various FPS theories. Stuff like running water is obvious, but so much of the other variables (population, animals, loose stone, mined tiles, furniture, &c.) are all so highly correlated with the age of a fort, that you'd have to be very careful to tease out exactly what impact each factor makes independently. And you see stuff like "ramps are faster than stairways," but without any hard data to back it up, it's really all anecdote and conjecture at this point.
Logged

Truean

  • Bay Watcher
  • Ok.... [sigh] It froze over....
    • View Profile
Re: "Using up stone" How does that REALLY work for fps?
« Reply #46 on: June 29, 2010, 01:36:37 pm »

I think the issue is dwarf speed, creature speed, task speed and skill training speed. (Also, I'm sure "but it started out as 100," enters into this as comparison bias. Is 7 a large number? Compared to what? Compared to 10 sure I guess it is. Compared to 100 or 1000, no, it doesn't seem so big.)

Sometimes, things just seem to take forever in DF. The fact that Dwarves don't move when you want them to doesn't help. Personally, I'd prefer the game date/time just move slower to compensate. After all, it took my Dwarf two days to get enough stone to make a ring.... Meanwhile, my adventurer just crossed an entire forest full of region tiles in under a day. Go figure. It's about the mass/time/skill learning differences in the game. You look at them and they don't seem right like "something doesn't add up here."

I'm not bitching mind you. I love the game, but it is still in Alpha.

Where else am I gonna get a Sim Ant Colony Dwarf fortress building game. :)
Logged
The kinda human wreckage that you love

Current Spare Time Fiction Project: (C) 2010 http://www.bay12forums.com/smf/index.php?topic=63660.0
Disclaimer: I never take cases online for ethical reasons. If you require an attorney; you need to find one licensed to practice in your jurisdiction. Never take anything online as legal advice, because each case is different and one size does not fit all. Wants nothing at all to do with law.

Please don't quote me.

Hammurabi

  • Bay Watcher
    • View Profile
Re: "Using up stone" How does that REALLY work for fps?
« Reply #47 on: June 29, 2010, 01:44:18 pm »

According to this post, the game spends over 80% of the time moving units.  Apparently the moveunit() function does a large amount of redundant checks. 
Logged
Back in 1971, Nolan Bushnell of Atari said, "All the best games are easy to learn, and difficult to master," a design philosophy now treated as instinctual by nearly every designer in the industry.

Hyndis

  • Bay Watcher
    • View Profile
Re: "Using up stone" How does that REALLY work for fps?
« Reply #48 on: June 29, 2010, 02:42:53 pm »

My fort is currently at 130 dwarves, and it is a very large 3x3 fort using up a nearly all of the map above the first cavern layer, with many vertical constructions.

If nothing is going on my FPS is around 200ish.

If I tell my dwarves to start doing something, like strip the surface forest bare with axes and haul all of the lumber in, my FPS will plummet to around 75 while they're doing this. As soon as they finish going up to the surface through the entryway to do this the FPS jumps back up.

Similarly, if I order them to atom smash a bunch of junk the FPS drops while they all path to do this, but the FPS goes back up once they're done.
Logged

LemonFrosted

  • Bay Watcher
  • I can't really make you love me
    • View Profile
Re: "Using up stone" How does that REALLY work for fps?
« Reply #49 on: June 29, 2010, 04:11:50 pm »

Quote
With more than 5,000 stone there is a noticeable pause whenever I select the workshop. The workshop needs to decide what jobs it can show, and so it finds all items that it can potentially use, which is every stone that has ever been mined. With 15,000 stone its a full 1-2 second pause.

This kind of thing (similarly, the noticeable pause when a bunch of enemies or a caravan spawn, or when doors are forbidden or unforbidden) seems to cast doubt on the "pathfinding hurts FPS" conventional wisdom, IMHO.

Pathfinding is a relatively rare event in frame terms (creatures only get to do any action every couple or frames or so, and most of the time they are going to be moving along a path rather than calculating a new one), so while you can observe moments like this where a whole bunch of pathfinding jobs cause a noticeable little delay at a single point in time, it's not something that would manifest as a steady drag on FPS, I don't think.

I thought the theory behind item count hurting FPS was that the simulation needs to check all the objects in the game each frame to see if, e.g., it's hot enough for hunk of stone #419330 to melt or burst into flames or fall through the air or whatever.

But yeah, in general I'm pretty skeptical about a lot of the various FPS theories. Stuff like running water is obvious, but so much of the other variables (population, animals, loose stone, mined tiles, furniture, &c.) are all so highly correlated with the age of a fort, that you'd have to be very careful to tease out exactly what impact each factor makes independently. And you see stuff like "ramps are faster than stairways," but without any hard data to back it up, it's really all anecdote and conjecture at this point.
But this would be why it's a gradual drop in FPS from 100 down to 10 over time. The reason it doesn't seize up entirely is because it's not making all those path checks simultaneously outside some special circumstances, but is, instead, gradually adding a whole bunch of un-synched path checks giving you a slower game rather than a slide show.
Logged

Pistolero

  • Bay Watcher
    • View Profile
Re: "Using up stone" How does that REALLY work for fps?
« Reply #50 on: June 30, 2010, 07:53:32 am »

Embark size is the biggest factor for me. After mining out my first farm plot and opening up the irrigation my fps is usually around 120. On a 2x2 embark its closer to 270. I was hesitant to try it for quite a while, thinking 2x2 would be too small, but it's a surprisingly large area, and with appropriate world gen parameters I can still get steel, glass, and a volcano.

The only other anecdote I have regards animals. I'm pretty sure something else was going on here, but my fort was getting a bit older, FPS was around 40, I butchered a dozen dogs and fps jumped to 67. I don't think twelve dogs could have that much effect though so I'm guessing something else happened that I am unaware of.
Logged

Hyndis

  • Bay Watcher
    • View Profile
Re: "Using up stone" How does that REALLY work for fps?
« Reply #51 on: June 30, 2010, 10:29:04 am »

Animals have a huge effect. Tired of the herds of cats in my current fort, I just made cats aquatic. The cat herds were quickly taken care of. That got me around 50 additional FPS.

Still have the herds of dogs around. Waiting for the military in my current fort to get up to par, then I'll get rid of the dogs as well. Dogs are much easier to get rid of since you can just butcher them all. They're also great for taking down a berserk dwarf in large numbers.
Logged

Truean

  • Bay Watcher
  • Ok.... [sigh] It froze over....
    • View Profile
Re: "Using up stone" How does that REALLY work for fps?
« Reply #52 on: June 30, 2010, 10:48:55 am »

Quote
Animals have a huge effect. Tired of the herds of cats in my current fort, I just made cats aquatic. The cat herds were quickly taken care of. That got me around 50 additional FPS.

Still have the herds of dogs around. Waiting for the military in my current fort to get up to par, then I'll get rid of the dogs as well. Dogs are much easier to get rid of since you can just butcher them all. They're also great for taking down a berserk dwarf in large numbers.

How the crap do I deal with my herd of cave tortoises? Just because they're slow doesn't mean by fort has to be. This modded animal is critical, because they provide shell for moods. They have literally saved the lives of 9 of my most skilled Dwarves and given me artifact weapons and armor.

Simply, how do I set up large scale breeding programs without murdering my framerate? I have currently tied them up with ropes in a 3x3 area. Are they the reason my FPS is dead? By the way, I have well over 170 breeding animals not including offspring. I don't farm. How do I set this up with better framerate considerations?

 
Logged
The kinda human wreckage that you love

Current Spare Time Fiction Project: (C) 2010 http://www.bay12forums.com/smf/index.php?topic=63660.0
Disclaimer: I never take cases online for ethical reasons. If you require an attorney; you need to find one licensed to practice in your jurisdiction. Never take anything online as legal advice, because each case is different and one size does not fit all. Wants nothing at all to do with law.

Please don't quote me.

Daetrin

  • Bay Watcher
    • View Profile
Re: "Using up stone" How does that REALLY work for fps?
« Reply #53 on: June 30, 2010, 11:00:35 am »

Quote
Animals have a huge effect. Tired of the herds of cats in my current fort, I just made cats aquatic. The cat herds were quickly taken care of. That got me around 50 additional FPS.

Still have the herds of dogs around. Waiting for the military in my current fort to get up to par, then I'll get rid of the dogs as well. Dogs are much easier to get rid of since you can just butcher them all. They're also great for taking down a berserk dwarf in large numbers.

How the crap do I deal with my herd of cave tortoises? Just because they're slow doesn't mean by fort has to be. This modded animal is critical, because they provide shell for moods. They have literally saved the lives of 9 of my most skilled Dwarves and given me artifact weapons and armor.

Simply, how do I set up large scale breeding programs without murdering my framerate? I have currently tied them up with ropes in a 3x3 area. Are they the reason my FPS is dead? By the way, I have well over 170 breeding animals not including offspring. I don't farm. How do I set this up with better framerate considerations?

You probably don't need that many.  Probably the best thing would be to cage a male and a female (or a male and 3-4 females) and slaughter everything else.

If you've breached a cavern you can easily end up with a lot of meat just from those animals blundering into your defenses.  And if you don't do shell crafts you'll never need more than 3-4 shells available at a time.  If you have 100 that's probably good enough for the life of the fort.  Even if it isn't you can always start breeding the turtles again once you drop below a certain number.
Logged
All you need to know about Ardentdikes
It is really, really easy to flood this place with magma fwiw.

Doors stop fire, right?

Olreich

  • Escaped Lunatic
    • View Profile
Re: "Using up stone" How does that REALLY work for fps?
« Reply #54 on: June 30, 2010, 11:18:17 am »

Quote
Animals have a huge effect. Tired of the herds of cats in my current fort, I just made cats aquatic. The cat herds were quickly taken care of. That got me around 50 additional FPS.

Still have the herds of dogs around. Waiting for the military in my current fort to get up to par, then I'll get rid of the dogs as well. Dogs are much easier to get rid of since you can just butcher them all. They're also great for taking down a berserk dwarf in large numbers.

How the crap do I deal with my herd of cave tortoises? Just because they're slow doesn't mean by fort has to be. This modded animal is critical, because they provide shell for moods. They have literally saved the lives of 9 of my most skilled Dwarves and given me artifact weapons and armor.

Simply, how do I set up large scale breeding programs without murdering my framerate? I have currently tied them up with ropes in a 3x3 area. Are they the reason my FPS is dead? By the way, I have well over 170 breeding animals not including offspring. I don't farm. How do I set this up with better framerate considerations?

To answer the pertinent question, make the rooms smaller. Set them up in 1x1 rooms with floodgates or some such attached to levers for optimal containment. At that point, even if the game wants to move them out, it won't bother pathing them all the way out. Non-pet-passable and forbidden doors don't seem to work right, so even if you have them, the pets will path all the way to the other side of the fort before trying to walk there and getting stuck on the door. That will eat up another bunch of cycles on your CPU as they try to run into the door.

Even with 1x1 rooms and real barriers, the pets will still TRY to path every few frames or so, but the pathing will be an order of 3x or so faster. Also, setting their speed value to 200 or more will stop them from acting but every 200 frames, meaning less pathing and trying to run out the door (you may want to try that first, since the other methods are more cumbersome). If Toady fixed forbidden doors, then they might also work (I haven't had a chance to test forbidden doors in 31.08, it keeps crashing), so try them early on too.
Logged

Akura

  • Bay Watcher
    • View Profile
Re: "Using up stone" How does that REALLY work for fps?
« Reply #55 on: June 30, 2010, 11:20:39 am »

Animals have a huge effect. Tired of the herds of cats in my current fort, I just made cats aquatic. The cat herds were quickly taken care of. That got me around 50 additional FPS.
The proper term is a "clowder" of cats. There is no need to know how I know that. ;D

I've just started a fort in .08(using .03 previously) and so far it's working well, but it's only a year old. I'll wait for it to get much bigger before I watch for a massive FPS hit.
Logged
Quote
They asked me how well I understood theoretical physics. I told them I had a theoretical degree in physics. They said welcome aboard.
... Yes, the hugs are for everyone.  No stabbing, though.  Just hugs.

Nome

  • Bay Watcher
    • View Profile
Re: "Using up stone" How does that REALLY work for fps?
« Reply #56 on: June 30, 2010, 12:09:41 pm »

I have definitely seen a significant boost in fps from vaporizing stone.  I had 10000+ stone kicking around and vaporized ~8000 of it.  The result was a 15 fps boost (from about 12 to 27).  I imagine you'd get the same result from atom smashing it, though waiting for 8000 stone to be hauled would be a pain.

I've also seen a boost from caging all the fortresses animals.
Logged

tps12

  • Bay Watcher
    • View Profile
Re: "Using up stone" How does that REALLY work for fps?
« Reply #57 on: July 01, 2010, 07:57:32 am »

But this would be why it's a gradual drop in FPS from 100 down to 10 over time. The reason it doesn't seize up entirely is because it's not making all those path checks simultaneously outside some special circumstances, but is, instead, gradually adding a whole bunch of un-synched path checks giving you a slower game rather than a slide show.

Okay, that makes sense.
Logged

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: "Using up stone" How does that REALLY work for fps?
« Reply #58 on: July 01, 2010, 10:50:46 am »

To those who doubt that item counts have an impact on framerate, I should think you might want to look at my experiments with increasing caravan capacities by a couple orders of magnitude to see just how much impact item counts can have.

When the merchants started bringing in tens of thousands of items, the instant those merchants were loaded into the game (before all of the wagons even entered the map, they were simply waiting to get on the map), it made an immediate and profound impact on my framerate, dropping it from 60 or so FPS down to about 12.

Subsequent atom-smashing of the trash raised my FPS back up to around 35, although by that time, 2 years had passed, and I had more fluid motion and population to drag down FPS.

One of the problems is that every single object in the game (aside from those in constructions) is apparently iterated through every single frame as the game currently stands.  This may be because of Temperature (this is just speculation on my part), which will check what state of matter every item should be in every frame based upon the ambient temperature, meaning that even if nothing is even looking for your 20,000 pieces of trash locked away in a place nobody is looking for or can even path to, then the game still checks that stuff against ambient temperature.

Pathfinding is the major killer in many forts because pathfinding is the one thing you can't possibly help having the computer do.  Fluid mechanics are brutal and obvious FPS killers, and were responsible for about 30 or so FPS loss in my last fort because I had a serious waterworks project.  And I know that it was precisely the fluid mechanics that did it, because the presence of water in my resevoirs and piping created measurable 10 or more FPS drops which I could regain by flushing the system down into the bottomless pit.
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

Barrow

  • Bay Watcher
    • View Profile
Re: "Using up stone" How does that REALLY work for fps?
« Reply #59 on: July 01, 2010, 12:15:12 pm »

Getting back to the original question in this post (though the other tips are far more useful for FPS boosts), I'm running a test of vaporizing 50k+ stone right now to see how much of a boost it gives. I'll updated as soon as my [SPEED:0] dwarves finish moving it.
Logged
Pages: 1 2 3 [4] 5 6 7