Bay 12 Games Forum

Please login or register.

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

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

forsaken1111

  • Bay Watcher
    • View Profile
    • TTB Twitch
Re: "Using up stone" How does that REALLY work for fps?
« Reply #15 on: June 28, 2010, 02:18:51 am »

I haven't ever noticed a FPS increase or decrease due to items myself, though I don't think I have ever gotten into the 50,000+ range. Most of my FPS decreases are due to liquids moving around.
Logged

drayab

  • Escaped Lunatic
    • View Profile
Re: "Using up stone" How does that REALLY work for fps?
« Reply #16 on: June 28, 2010, 03:57:03 am »

I find that keeping the pet count low helps. I do try very hard to get rid of all the excess rock, but my FPS still steadily drops as the fort ages, even after the population has reached a steady state. I wonder if all the trash that collects on the surface from dead goblins is the culprit, but it is a pain to unforbid it all and mark it for dumping (onto semi molten rock).
Logged

Ubern00b

  • Bay Watcher
    • View Profile
Re: "Using up stone" How does that REALLY work for fps?
« Reply #17 on: June 28, 2010, 05:31:28 am »

Logged
Quote from: Canuhearme(Facepunch Studios)
Isn't Dwarf Fortress just a game of delayed free-fall into a hideously painful and frighteningly horrific death?

forsaken1111

  • Bay Watcher
    • View Profile
    • TTB Twitch
Re: "Using up stone" How does that REALLY work for fps?
« Reply #18 on: June 28, 2010, 05:34:05 am »

you do realize that 12-14 FPS is optimum for the human eye right?

NO! http://www.100fps.com/how_many_frames_can_humans_see.htm
Yes, we know. He obviously pulled that 'fact' right out of his ass.
Logged

Kazang

  • Bay Watcher
    • View Profile
Re: "Using up stone" How does that REALLY work for fps?
« Reply #19 on: June 28, 2010, 06:10:45 am »

Item counts don't really negatively effect your fps unless they are involved in other calculations.

Like if you had a 1000 socks a dwarf going to get a new sock would have to choose from a 1000 socks, which makes it a "harder" decision than picking up the only sock on the map.  I imagine this would be exponential in the case of stone but simply forbidding the vast amount of it will have the same effect.  However the fps difference will be minimal and not really noticeable in the majority of cases though.  Basically unless you have millions of stone you are really not going to see a noticeable performance drop caused by the stone.  Considering dwarfs are thinking about this kind of thing constantly it's as much to do with number and activity of the dwarfs as the amount of items.  What really causes the drop the newly mined out space that can be pathed to, creating the illusion that it is the stone that is causing the problem.


Pathfinding, physics, creature calculations are what really hurt the fps.  The amount of open accessible space is really the biggest factor, and thus pathfinding.  This is easy to test yourself, just gen a world with the maximum cavern size and number then dig down and expose them all, discovering all the space and setting it to be used by woodcutting, plant harvesting, silk harvesting or some such.  You will see a quite significant drop in your fps.  Every creature added is going to decrease you fps by the amount multiplied by the area of accessible space.
The more multi level the world the worse the pathing seems to be.  Such as if the caverns have a flat floor it seems a lot easier on fps then if they had steep high mounds and stalagmites everywhere.
Logged

Srial

  • Bay Watcher
    • View Profile
Re: "Using up stone" How does that REALLY work for fps?
« Reply #20 on: June 28, 2010, 07:29:33 am »

Thanks everyone for the ideas and discussion.  I apologize if my post came off bitchy, I didn't mean the first one to be.  I was merely trying to find the difference between what people have found to actually work vs what people have been told works that may or may not.   

Also I did notice a slight fps increase, 2-3 fps, when I slaughtered my 35 critters wandering around my fort down to the 4 claimed ones.  Any improvement is good but I ran out on things to kill.

I'll shift my attention to some better fort design in the next one and stop worrying about the stone so much.  I definitely want to try getting rid of my stairs for ramps and see how that helps.

Thanks again for the responses.
Logged

Hammurabi

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

In another thread, someone profiled DF and found most of the time is spent in pathfinding.  It is unclear if pathfinding is slow due to too many items or some other reason.  What's the best way to structure a test to discover more information?
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.

palsch

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

In another thread, someone profiled DF and found most of the time is spent in pathfinding.  It is unclear if pathfinding is slow due to too many items or some other reason.
It would really depend, but we do know a few things.

The raw distance to an item is calculated in a relatively simple way; as the eagle flies mole burrows direct distance, ignoring paths. This value is what is calculated and used whenever a dwarf wants a certain item or material. Therefore, the selection method is;
1) Populate list of potential items.
2) Calculate distance to each.
3) Select the 'closest'.
4) Calculate path to this item.

One potential problem is access. Inaccessible items need to be excluded from the initial list. This means keeping track of what parts of the fort are accessible from others.

This would add some cost to having more items (more distances to calculate), but those calculations are relatively simple to work out. The path calculations themselves are considerably harder. I'd guess that adding more items would be a negligible cost at that stage (while still having some cost earlier), while anything that makes the paths themselves more complicated could increase the path calculations hugely.

Of course, the more animals and dwarves you have finding paths, the worse it gets.
Logged

Lemunde

  • Bay Watcher
    • View Profile
Re: "Using up stone" How does that REALLY work for fps?
« Reply #23 on: June 28, 2010, 10:52:05 am »

you do realize that 12-14 FPS is optimum for the human eye right?

Heh, beaten to it.  I've heard this one a lot but usually it's between 25 and 30 fps.  This is the lowest I've ever heard.  I'd rather not sound like a know-it-all but I think it's important to stop misinformation like this as soon as it's spotted.
« Last Edit: June 28, 2010, 10:55:29 am by Lemunde »
Logged

Hammurabi

  • Bay Watcher
    • View Profile
Re: "Using up stone" How does that REALLY work for fps?
« Reply #24 on: June 28, 2010, 10:55:02 am »

The raw distance to an item is calculated in a relatively simple way; as the eagle flies mole burrows direct distance, ignoring paths. This value is what is calculated and used whenever a dwarf wants a certain item or material. Therefore, the selection method is;
1) Populate list of potential items.
2) Calculate distance to each.
3) Select the 'closest'.
4) Calculate path to this item.

Let's just assume this is how it works.  Obviously as forts get bigger, the selection method takes up more and more time.  Here's what needs to change.

1. A workshop should be able to designate a stockpile to draw from.
2. When a workshop job needs an item, it looks for it in the associated stockpile.
3. If Stockpile doesn't have the item needed, the search reverts back to the old method.
4. If a workshop has no designated stockpile, the search reverts back to the old method.

This results in most jobs only looking for the closest item from a handful of items, instead of every item in the fort.  It also allows some control over the material used for a job by controlling the material in the stockpile. 

 
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.

Threlicus

  • Bay Watcher
    • View Profile
Re: "Using up stone" How does that REALLY work for fps?
« Reply #25 on: June 28, 2010, 11:22:12 am »

If you build your raw materials stockpiles near the workshops that use them, though, this is going to be a very quick check even in the current method, since the cube of materials available for choice is much smaller. I tend to build my stockpiles directly under or over the relevant workshops (yes, even a stone stockpile for the mason) so the skilled workers don't have to go hunting, so that should be a very short list of candidates.

I think the pathfinding usage is more likely to be taken up by the haulers who have to fill those stockpiles, instead. Those poor sods have to go all over the fort.
Logged

Kazang

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

The raw distance to an item is calculated in a relatively simple way; as the eagle flies mole burrows direct distance, ignoring paths. This value is what is calculated and used whenever a dwarf wants a certain item or material. Therefore, the selection method is;
1) Populate list of potential items.
2) Calculate distance to each.
3) Select the 'closest'.
4) Calculate path to this item.

Let's just assume this is how it works.  Obviously as forts get bigger, the selection method takes up more and more time.  Here's what needs to change.

1. A workshop should be able to designate a stockpile to draw from.
2. When a workshop job needs an item, it looks for it in the associated stockpile.
3. If Stockpile doesn't have the item needed, the search reverts back to the old method.
4. If a workshop has no designated stockpile, the search reverts back to the old method.

This results in most jobs only looking for the closest item from a handful of items, instead of every item in the fort.  It also allows some control over the material used for a job by controlling the material in the stockpile.

I could be wrong but i'm pretty sure dwarfs will always pick the closest object, however it's scans the list and calculates the pathing for each object individually rather than scanning the immediate vicinity until it finds a suitable object.

Really the method for selection needs to be changed to be more efficient.  But the above suggest would be helpful, if ultimately just a plaster on a gaping wound. 
Logged

Daetrin

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

Having switched from a central up/down stairs design to a ramp based design, I have noticed an FPS increase. However, I don't think that's exactly because ramps are better, but they force a single-path design, because you can't stack them. For example, I have a central spiral staircase with various sectors leading off. If a dwarf wants to path to a rock, there's essentially one possible path, rather than multiple viable paths. As I understand it, the more constrained the path is (it's not just path length), the better for FPS. Of course, this opposes fastest path philosophy, but designed properly I don't find there to be that much of a difference.
Logged
All you need to know about Ardentdikes
It is really, really easy to flood this place with magma fwiw.

Doors stop fire, right?

lanceleoghauni

  • Bay Watcher
  • Purveyor of Ridiculous machinery.
    • View Profile
Re: "Using up stone" How does that REALLY work for fps?
« Reply #28 on: June 28, 2010, 12:55:25 pm »

you do realize that 12-14 FPS is optimum for the human eye right?

NO! http://www.100fps.com/how_many_frames_can_humans_see.htm
Yes, we know. He obviously pulled that 'fact' right out of his ass.

My bad... my reading is out of date  :'(

Please ignore me.

Oh, Looked it up, I was thinking of Movie FPS, which is about TWENTY four, not 12-14. herp derp lrn2read.
« Last Edit: June 28, 2010, 01:00:20 pm by lanceleoghauni »
Logged
"Mayor, the Nobles are complaining again!"

*Mayor facepalms*

"pull the lever of magmatic happiness"

cephalo

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

I would say that in my case goblinite creates far more items than any stone I dig up. All the crap from 20 goblins a year adds up extremely fast. I wonder how forbidden junk affects frame rate.
Logged
PerfectWorldDF World creator utility for Dwarf Fortress.

My latest forts:
Praisegems - Snarlingtool - Walledwar
Pages: 1 [2] 3 4 ... 7