Bay 12 Games Forum

Dwarf Fortress => DF Gameplay Questions => Topic started by: Leonidas on September 18, 2010, 02:08:21 pm

Title: Would this fix the blood FPS problem?
Post by: Leonidas on September 18, 2010, 02:08:21 pm
I've been thinking about the extreme frustration of FPS loss due to blood.  What would happen if you deleted blood from the game entirely? 

It's a single line in the Raws.  Even creatures with goo or ichor in their veins have a line that starts with "[BLOOD:"  For someone who knew what he was doing, it would be a pretty easy task to automate a search through the raws to rip out all those lines.

This would change the game balance some.  Bloodless creatures are harder to kill because they can't bleed to death.  But your dwarves also wouldn't have any blood, so it would probably balance out.
Title: Re: Would this fix the blood FPS problem?
Post by: Gearheart on September 18, 2010, 02:09:40 pm
Are you sure that would not just automatically kill everything in the entire world that has blood?

Because killing everything in the entire world is probably bad.
Title: Re: Would this fix the blood FPS problem?
Post by: Leonidas on September 18, 2010, 02:20:42 pm
Are you sure that would not just automatically kill everything in the entire world that has blood?
The game already has lots of bloodless creatures.  That's what gave me the idea.  Essentially, every creature would become undead.  The major balance change would be that bloodless creatures would become relatively less difficult.

But I'm no modder.  I'm just floating the idea.
Title: Re: Would this fix the blood FPS problem?
Post by: ledgekindred on September 18, 2010, 02:22:07 pm
I did this on accident to a cat mod.  I forgot to give it blood, and wound up with "smear of cat n/a" all over the place when cats would get wounded.

It's possible that if you modded the basic body type definitions you could get rid of blood being present in any form, doing the same for goo and the other types of liquids some animals contain.  But as Gearheart implied, a lot of the combat system relies blood loss.  Either everything would immediately die, or nothing would ever die, I'm not entirely sure which.  The cat thing implies that they would never bleed out on account of not having blood.

A better solution would be to mod the blood template in the save raws to have a very low boiling point.  Any exposed blood would immediately boil away and evaporate into nothing.  On the other hand I've noticed that doing this also sometimes seem to cause any creature with bleeding wounds to also have all their blood boil and evaporate into nothing.

Play with the boiling point of blood in arena mode.  Throw a bunch of dwarves, goblins and cats in.  Let 'em beat the crap out of each other and bleed everywhere and see what happens to all the leftover blood once combat ends. If you can wind up with bleeding but alive critters, even better coz you can see if all their blood boils out and they keel over dead.
Title: Re: Would this fix the blood FPS problem?
Post by: Hamster Man on September 18, 2010, 04:20:15 pm
I'm fairly certain it will not kill creatures. I recall at one point back in 40d, I was sick of blood smears everywhere and did exactly that - removed the "Blood" line on all the creatures in the raws.

I seem to recall it actually worked too, but I picked up the "dfclean" not too much later, and went back to letting them bleed everywhere.

You'll have to test for yourself, though. My memory isn't what it used to be (and 2010 changed quite a few things too).
Title: Re: Would this fix the blood FPS problem?
Post by: oso on September 18, 2010, 07:49:48 pm
Something seriously needs to be done about this, complete game breaker. I just encountered it for the first time and my >50 fps fort dropped to <40 fps after my first siege despite running DFcleanmap immediately after fighting ended. For all previous ambushes I just trapped everything in cages which had no effect on FPS, this one was a blood bath and now my fortress is becoming unplayable :(
Title: Re: Would this fix the blood FPS problem?
Post by: Leonidas on September 19, 2010, 02:01:34 am
Changing the boiling temperature of blood is a partial solution.  It made arena battle much less bloody, at least with most creatures.

In your raws>objects folder, open material_template_default.txt.  Find blood_template.  Change boiling_point to 10069.  And if you want this to apply to your current game, you'll need to do this to the raws under data>save>region.  You probably also want to change the boiling point of ichor, goo, slime and pus in the same file.

I don't recommend setting the boiling point any lower than 10069.  That would cause blood to boil in spectacular sprays on most hits, coating everyone nearby and spamming your combat log. 

I don't think that this'll hurt your current game, but I don't really know.  So backup and edit at your own risk.

This only seems to help with creatures who have the standard homeotherm of 10067.  It didn't help against dragons, who have a lower homeotherm.

This is only a partial solution because creatures and corpses are still coated in blood, and I'm not sure how much that hurts the FPS.  Dumping water on the corpses just washes the blood onto the floor and walls, where it does NOT boil away.  Still, for those discouraged with FPS loss due to blood, this along with DFClean may make the game playable again.
Title: Re: Would this fix the blood FPS problem?
Post by: MaDeR Levap on September 19, 2010, 04:32:48 am
This is only a partial solution because creatures and corpses are still coated in blood, and I'm not sure how much that hurts the FPS.
In Dwarf Fortress, EVERYTHING rape CPU.
Title: Re: Would this fix the blood FPS problem?
Post by: pushy on September 19, 2010, 06:58:48 am
[BLOOD:LOCAL_CREATURE_MAT:BLOOD:SOLID]

[BLOOD:LOCAL_CREATURE_MAT:BLOOD:GAS]

Choose whichever. The problem with blood spatter is that it's a liquid which is being spread all over the place. If blood is a gas, you see clouds of boiling blood when arms get lopped off and stuff, but after combat there's no trace of blood at all. If blood is a solid there's no cloud of boiling blood, there are no pools of blood on the ground or anything...but for some reason, despite there being no blood on the ground, looking at inventory will reveal that dwarves still have blood spatter all over them. Either way, it cleans up the mess :)
Note, though, that I've only tried this out in the testing arena and not in fortress mode or anything, so I'm not sure of long-term implications of making either change (except presumably not being able to embark with or trade for buckets of blood...if you'd actually want to do that :-\)
Title: Re: Would this fix the blood FPS problem?
Post by: jei on September 19, 2010, 08:15:43 am
Changing the boiling temperature of blood is a partial solution.  It made arena battle much less bloody, at least with most creatures.

In your raws>objects folder, open material_template_default.txt.  Find blood_template.  Change boiling_point to 10069.  And if you want this to apply to your current game, you'll need to do this to the raws under data>save>region.  You probably also want to change the boiling point of ichor, goo, slime and pus in the same file.

I don't recommend setting the boiling point any lower than 10069.  That would cause blood to boil in spectacular sprays on most hits, coating everyone nearby and spamming your combat log. 

I don't think that this'll hurt your current game, but I don't really know.  So backup and edit at your own risk.

This only seems to help with creatures who have the standard homeotherm of 10067.  It didn't help against dragons, who have a lower homeotherm.

This is only a partial solution because creatures and corpses are still coated in blood, and I'm not sure how much that hurts the FPS.  Dumping water on the corpses just washes the blood onto the floor and walls, where it does NOT boil away.  Still, for those discouraged with FPS loss due to blood, this along with DFClean may make the game playable again.

I did this in my currently 1-2 FPS running game and thusfar no performance improvements. If I understand correctly, this would mainly work and help against further and future performance degradation?
Title: Re: Would this fix the blood FPS problem?
Post by: jei on September 19, 2010, 08:20:36 am
[BLOOD:LOCAL_CREATURE_MAT:BLOOD:SOLID]
[BLOOD:LOCAL_CREATURE_MAT:BLOOD:GAS]

Choose whichever. The problem with blood spatter is that it's a liquid which is being spread all over the place. If blood is a gas, you see clouds of boiling blood when arms get lopped off and stuff, but after combat there's no trace of blood at all. If blood is a solid there's no cloud of boiling blood, there are no pools of blood on the ground or anything...but for some reason, despite there being no blood on the ground, looking at inventory will reveal that dwarves still have blood spatter all over them. Either way, it cleans up the mess :)
Note, though, that I've only tried this out in the testing arena and not in fortress mode or anything, so I'm not sure of long-term implications of making either change (except presumably not being able to embark with or trade for buckets of blood...if you'd actually want to do that :-\)

And this would need to be done to regionX/raw/objects/ with any occurrences in files:

creature_subterranean.txt
creature_standard.txt:
creature_small_riverlake.txt
creature_small_ocean.txt:
creature_small_mammals.txt:
creature_savage_tropical.txt:
creature_other.txt:
creature_next_underground.txt:
creature_large_tundra.txt:
creature_large_tropical.txt:
creature_large_temperate.txt:
creature_large_riverlake.txt:
creature_large_ocean.txt:
creature_large_mountain.txt:
creature_domestic.txt:
creature_birds.txt:

I take it. A piece of cake with perl to do. But you also probably need to do it to ichor, goo, slime and pus too to have a significant effect.
Hope this doesn't give my creatures too severe gas problems. Also, probably doesn't work to help in FPS-loss that has already happened,
but should work against future loss I suppose... Not that FPS 1 can go down all that much more anyway... I hope.
Title: Re: Would this fix the blood FPS problem?
Post by: jei on September 19, 2010, 10:39:00 am
This is actually pretty stylish as you get boiling blood clouds from severe wounds, Makes it easier to follow battles. And makes them somewhat cooler looking.
Title: Re: Would this fix the blood FPS problem?
Post by: jei on September 19, 2010, 11:23:55 am
This is actually pretty stylish as you get boiling blood clouds from severe wounds, Makes it easier to follow battles. And makes them somewhat cooler looking.

Wonder if you could easily mod dwarves to get nice feelings out of blood spray mists as they do from water mist. ;D

Title: Re: Would this fix the blood FPS problem?
Post by: jei on September 19, 2010, 12:02:25 pm
So I did:
perl -pi -e "s/BLOOD:LOCAL_CREATURE_MAT:BLOOD:LIQUID/BLOOD:LOCAL_CREATURE_MAT:BLOOD:GAS/g" *
perl -pi -e "s/BLOOD:LOCAL_CREATURE_MAT:ICHOR:LIQUID/BLOOD:LOCAL_CREATURE_MAT:ICHOR:GAS/g" *
perl -pi -e "s/BLOOD:LOCAL_CREATURE_MAT:GOO:LIQUID/BLOOD:LOCAL_CREATURE_MAT:GOO:GAS/g" *
perl -pi -e "s/PUS:LOCAL_CREATURE_MAT:PUS:LIQUID/PUS:LOCAL_CREATURE_MAT:PUS:GAS/g" *

in regionX/raw/objects/ folder.

and I've noted no obvious problems so far. However, also no real fix for the FPS 1-3 problem. Although, I think I see now more of FPS 3 than prior to fixing attempt, when it was rather steadily in 1-2, and I suspect this will stop things from getting much worse (not that they can).
I'll update here if performance changes for better or worse when more in-game time passes.

Also, I suspect cleaning the map of blood might help a lot, for which I have no working tool (.13) right now.

Also note: Adamantine is still minable when playing .12 -generated fortress with .13.
Title: Re: Would this fix the blood FPS problem?
Post by: ledgekindred on September 19, 2010, 12:42:20 pm
This is actually pretty stylish as you get boiling blood clouds from severe wounds, Makes it easier to follow battles. And makes them somewhat cooler looking.

In the interest of Science I was screwing around experimenting in a scummed save from my existing fort which is absolutely soaked in blood and ichor.  I changed the boiling point of blood, ichor and goo in the materials_template file to 10001.  As soon as the fort loaded, every creature and item with blood on them was surrounded by a lovely - and huge - cloud of boiling blood and ichor, until it all boiled away and dissipated.  That surprisingly (but obviously in hindsight) included a whole lot of the skeletons and crap on the ground sitting in blood-soaked squares.  Quite pretty.  However it didn't affect any blood smears, spatters or stains on ground, floors, walls, etc. 

Watching my dwarves walk through the bathtub which was still full of pools of blood and ichor was fun.  They would walk in clean, walk out with their shoes all covered in guck, and it would immediately boil away in a puff.  Dogs were the best since they would always come out entirely covered so they made a big ole cloud.  I agree that it's a neat effect and possibly worth leaving in just for the looks of things. 

If you spend the time time messing around with the BOILING_POINT and SPEC_HEAT tokens you can get it to where the blood will remain for a short period of time before evaporating.  I messed with this in arena mode with my cat mod and eventually managed to make it work, but it's really titchy in terms of the values you want to use and probably not worth it.

I then used dfhack (still on .12 for now) to get rid of the rest of the blood.  Saved fort, set blood et al back to original temps and reloaded fort.  At that point I didn't see blood stuck to any surface, item or creature on the things I looked at.

Before cleaning everything up I was getting solid 20-21fps.  After cleaning everything up I was getting ... dun duh dunnn... solid 20-21fps.  No noticeable difference.
Title: Re: Would this fix the blood FPS problem?
Post by: jei on September 19, 2010, 01:30:11 pm
This is actually pretty stylish as you get boiling blood clouds from severe wounds, Makes it easier to follow battles. And makes them somewhat cooler looking.
Before cleaning everything up I was getting solid 20-21fps.  After cleaning everything up I was getting ... dun duh dunnn... solid 20-21fps.  No noticeable difference.

So it is as I was starting to fear already. No change for me either, though the maps are still bloody as I have no cleanup tools to use. -- This FPS loss is due to some bad programming elsewhere, though imo, related to contaminants. Or the cleanup didn't really effect the things the game keeps track of. Anyway, I am more and more of the mind that this is just a serious case of bad programming and design.

Maybe we have a ton of invisible vermins that eat the FPS? I know my fortress is littered with flies and rats picking at the corpses now...
Title: Re: Would this fix the blood FPS problem?
Post by: Leonidas on September 19, 2010, 02:08:59 pm
If you spend the time time messing around with the BOILING_POINT and SPEC_HEAT tokens you can get it to where the blood will remain for a short period of time before evaporating.  I messed with this in arena mode with my cat mod and eventually managed to make it work, but it's really titchy in terms of the values you want to use and probably not worth it.

That's what I was going for, but I never saw any effect from changing Spec_Heat.  If you can remember how you made that work, I would be interested.

So it is as I was starting to fear already. No change for me either, though the maps are still bloody as I have no cleanup tools to use. -- This FPS loss is due to some bad programming elsewhere, though imo, related to contaminants. Or the cleanup didn't really effect the things the game keeps track of. Anyway, I am more and more of the mind that this is just a serious case of bad programming and design.

Maybe we have a ton of invisible vermins that eat the FPS? I know my fortress is littered with flies and rats picking at the corpses now...

I suspect the coatings.  Each contaminant applied to each item and body part creates its own object.  Washing a dwarf converts blood coatings to water coatings, which presumably eventually evaporate.  But until that evaporation your FPS would stay unchanged.

My best idea right now is lots of wells.  Dwarves will use them to wash off, and I think they come away with no coatings.
Title: Re: Would this fix the blood FPS problem?
Post by: jei on September 19, 2010, 04:34:54 pm
If you spend the time time messing around with the BOILING_POINT and SPEC_HEAT tokens you can get it to where the blood will remain for a short period of time before evaporating.  I messed with this in arena mode with my cat mod and eventually managed to make it work, but it's really titchy in terms of the values you want to use and probably not worth it.

That's what I was going for, but I never saw any effect from changing Spec_Heat.  If you can remember how you made that work, I would be interested.

So it is as I was starting to fear already. No change for me either, though the maps are still bloody as I have no cleanup tools to use. -- This FPS loss is due to some bad programming elsewhere, though imo, related to contaminants. Or the cleanup didn't really effect the things the game keeps track of. Anyway, I am more and more of the mind that this is just a serious case of bad programming and design.

Maybe we have a ton of invisible vermins that eat the FPS? I know my fortress is littered with flies and rats picking at the corpses now...

I suspect the coatings.  Each contaminant applied to each item and body part creates its own object.  Washing a dwarf converts blood coatings to water coatings, which presumably eventually evaporate.  But until that evaporation your FPS would stay unchanged.

My best idea right now is lots of wells.  Dwarves will use them to wash off, and I think they come away with no coatings.

That still leaves all the coatings on stuff that is lying around left by dead merchants, goblins and whatnot. Is there a way to "boil away" all loose armor that lies outside? Making blood stains corrosive or hot as magma perhaps...

Even all the stuff like roach remains and seeds remain in the game after dwarves have dumped it. Is nothing really *ever* destroyed from the game's inventory? Doesn't seem like it. Or maybe the bits that merchants manage to get away with alive.

I guess I should try to get that dfbloodcleaner to work, though I'd need to revert to a savegame prior to .13 unless .13 saves work in .12.
Title: Re: Would this fix the blood FPS problem?
Post by: ledgekindred on September 19, 2010, 06:11:43 pm
That still leaves all the coatings on stuff that is lying around left by dead merchants, goblins and whatnot. Is there a way to "boil away" all loose armor that lies outside? Making blood stains corrosive or hot as magma perhaps...

That's exactly the stuff that boils away when you set the blood boiling point lower.  It's the stuff stuck to surfaces that you need dfhack to clean up.  With Pause on Load, I loaded up the fort after changing the blood values.  With it paused before calculating a single frame, I examined some of my dorfs, especially the military ones.  They had crap all over them and their weapons.  Unpaused, watched the lovely clouds, reexamined. Spotless. 

Contaminants just don't seem to affect FPS.  Aside from the fact that many times people have profiled df and found that pathfinding by far takes up most of the processing time.  More dwarves, more rooms, more space, more walkable area, more time spent figuring out how they each get from point a to point b.

That's what I was going for, but I never saw any effect from changing Spec_Heat.  If you can remember how you made that work, I would be interested.

I don't have any kind of methodical answer.  I messed with BOILING_POINT, SPEC_HEAT and MAT_FIXED_TEMP more or less at random.  boiling point and fixed temp are obvious, spec heat determines how quickly a material warms up or cools down.  If you set the fixed temp really low, and the boiling point at something less than room temperature and the spec heat really really small (I was using like 10) then at least sometimes it seems that you'll get little puddles temporarily until it warms up just enough and boils away.  But it was never that predictable and I was only using arena mode so in hotter or colder climes I doubt it would turn out the same.
Title: Re: Would this fix the blood FPS problem?
Post by: jei on September 19, 2010, 06:32:12 pm
Contaminants just don't seem to affect FPS.  Aside from the fact that many times people have profiled df and found that pathfinding by far takes up most of the processing time.  More dwarves, more rooms, more space, more walkable area, more time spent figuring out how they each get from point a to point b.

That's a bit of a hard pill to take as that just leaves very little that can be done by players, other than vainly hoping for a
better and more efficient pathing system. And waiting for it with unplayable forts. Also killing and caging of pets doesn't
seem to influence it that much in my case, even with a small area, but admittedly with 178 dorfs...

If all my forts end up at FPS 1-3 because I've dug too much, there's really nothing that I can do to fix things, besides not play.
The game is not "finishable" (i.e. Hell colonization) at that pace anymore.

The change from decent FPS to low numbers is still rather rapid and noticeable, often happening
in the course of one to two game years or so. -- Maybe it is the CPU running out of cache to run
some parts of the search system and is thus dependent on CPU model and cache as well...

It would be nice to know exactly how to avoid these FPS deaths, as they are really killing the game for me.
Title: Re: Would this fix the blood FPS problem?
Post by: ledgekindred on September 19, 2010, 10:40:28 pm
I'm a professional programmer and I have to honestly stand behind Toady in that I'm amazed what is in his game while leaving it playable on consumer hardware at all.  He stands very, very high on my list of developer respect for what he's accomplished.

There are still substantial optimizations he has yet to get around to, but he has promised many times, and for what it's worth, I believe he will indeed get to them.  In .13 he announced some optimizations that from some threads look like people are seeing as much as 20% fps improvement on existing forts.  (Too bad a lot of the other .13 weirdness doesn't appeal to many.) 

Not to sound like a jerk or a fanboi but, just gotta trust that Toady knows it's an issue and will get to it as soon as it's at the top of his worklist.
Title: Re: Would this fix the blood FPS problem?
Post by: Ganthan on September 19, 2010, 10:59:02 pm
So what you all are basically saying here is that FPS death is possibly NOT being caused by rampant contaminants?  Well then, back to the drawing board for us.  It must be pathfinding of many creatures.  I can't think of what else it could be.
Title: Re: Would this fix the blood FPS problem?
Post by: LuckyLuigi on September 20, 2010, 08:40:08 am
Yeah pathfinding is very likely to be a CPU killer.
Close of unused space with locked doors and make sure that there are no bottlenecks in your transport routes to optimize performance.
Minimize route length with multiple stockpiles feeding each other might also be benificial.
I'm not sure how many fps I'm getting (how to tell ?) but it dropped a lot already.
I read somewhere you could constrain your animals in pits so they can't move anymore. Sounds helpful.
Title: Re: Would this fix the blood FPS problem?
Post by: Psieye on September 20, 2010, 09:49:32 am
In init settings, there's an option to turn on the FPS counter. Animals being locked up in one way or another will help a bit, but I still claim it's dwarves that dish out most of the pathfinding FPS damage. You can argue there's no conclusive evidence, but plenty of stories tell of how forts can greatly delay FPS damage by limiting population. There are also stories of mature forts with low FPS which suddenly get really low FPS when invaders appear - some people used the FPS counter as an advanced radar for when ambushers spawned on the map as it turned from 20-ish to 6-ish.
Title: Re: Would this fix the blood FPS problem?
Post by: MaDeR Levap on September 20, 2010, 11:00:08 am
Well, first I want to be really sure that boiling off contaminants are really deleted forever from memory without any dangling references (wonder if Toady use any smart pointers... managing memory manually is pure masochism) and purged from any lists and whatever.

Why? While I can readily agree that contaiments could be less affecting FPS than I believed, I cannot believe this would make no difference at all. It looks like anything that was created in fortress taints FPS forever. Regardless of reason, it cannot be pathfinding alone - if this would be case, then murdered off fortress with 7 dorfs like on beginning would also have FPS like on beginning of game. Obviously, this is not the case.

Something - probably unholy combination of all possible reasons voiced here and elsewhere (from pathfinding to contaminations) - rapes CPU more and more with time.
Title: Re: Would this fix the blood FPS problem?
Post by: jei on September 20, 2010, 11:35:01 am
Well, first I want to be really sure that boiling off contaminants are really deleted forever from memory without any dangling references (wonder if Toady use any smart pointers... managing memory manually is pure masochism) and purged from any lists and whatever.

Why? While I can readily agree that contaiments could be less affecting FPS than I believed, I cannot believe this would make no difference at all. It looks like anything that was created in fortress taints FPS forever. Regardless of reason, it cannot be pathfinding alone - if this would be case, then murdered off fortress with 7 dorfs like on beginning would also have FPS like on beginning of game. Obviously, this is not the case.

Something - probably unholy combination of all possible reasons voiced here and elsewhere (from pathfinding to contaminations) - rapes CPU more and more with time.

Exactly! The FPS does not really return to it's former glory, no matter what happens or what you do, depite some people's logic telling us how it should. This implies something is seriously wrong somewhere.

One idea that comes to mind is grouping the path finding to group "leaders" in ambushes and sieges, where path finding is done only to one individual that the rest also "follow" and use to find their way. This is because sieges and ambushes appear now to have a big hit on FPS and if path finding is the problem, being cpu heavy such as it is and not much improvable, then the smart option is to not do so much path finding in the first place, or at least for such long and heavy paths.

Also critters, vermin, etc. should be probably disallowed real path finding altogether and just make them "random walker" types that only consider whether next step is safe or not and randomly pick steps to take. The same with FBs and HFS that are caged in levels with no access. Disallow real path finding to them (degrading them to random walkers) until something changes over, on, or below said levels where they are to make it sensible and allow them access. And even then "grouped" path finding might be better to save the computational costs. Also, maybe some levels should be "disallowed" to be considered in path finding for HFS and surface critters altogether, e.g. Hell and it's pits. Also do dogs, pets and cats need to wander around so much, they could be limited for the sake of performance to be random walkers on one level or only concerned to stay within some range of their owners, who follow his paths.

Right now the game interface also holds dead things eternally and that in it self should speak a lot about how things are done inside. And such things do not speak of smart design or quality, but negligence and laziness, going with minimum work and putting things off until they become a problem.

Anyway, I'm rather sad to be staying off the game just for performance reasons.
Title: Re: Would this fix the blood FPS problem?
Post by: gtmattz on September 20, 2010, 02:07:17 pm
And such things do not speak of smart design or quality, but negligence and laziness, going with minimum work and putting things off until they become a problem.

why waste time fine tuning something that is working (albeit poorly) when you are planning on completely rebuilding it before the product is finished.  You have to remember that we are testing the game right now, not playing anything near a finished product, so there will be portions that are allowed to flounder when other things (such as introducing complete new components to the game) are taken care of.  I am confident that, once the optimization stage has commenced, we will see serious performance increases, even if the game is kept to a single core.
Title: Re: Would this fix the blood FPS problem?
Post by: Akura on September 20, 2010, 02:31:07 pm
Instead of just boiling blood, why not make it flammable when exposed to air, as well?

Urist McBrewer cancels Brew Drink, got a splinter from the barrel.
*BOOM*
Title: Re: Would this fix the blood FPS problem?
Post by: Wastedlabor on September 20, 2010, 06:02:24 pm
[BLOOD:LOCAL_CREATURE_MAT:BLOOD:SOLID]

[BLOOD:LOCAL_CREATURE_MAT:BLOOD:GAS]

I think this makes dwarves ignore normal food and eat vermin only.
Title: Re: Would this fix the blood FPS problem?
Post by: jei on September 20, 2010, 10:56:01 pm
[BLOOD:LOCAL_CREATURE_MAT:BLOOD:SOLID]

[BLOOD:LOCAL_CREATURE_MAT:BLOOD:GAS]

I think this makes dwarves ignore normal food and eat vermin only.

Why would it do that?

I was testing a small fort and had steady 160 FPS with 7 dorfs until dropping down to 140 FPS with 20 new migrants and further to 80 FPS when I dug long straight tunnels that I like for ore vein location. It seems to me that at least long tunnels cause FPS degradation and are not well dealt with by path finding. Of course more path finders causes problems too.  This same computer has my normal low animal 60 dorf fort of 5 game years running at steady 2 FPS. (generated world at .12) Test world was generated at .13.

.13 seems to have some kind of large structures a lot that won't allow embark, like .12 structures did. This makes me very sad.

Also made a wooden room with walls and floor where I pumped aquifer water (with a pump on sand floor followed immediately by wood all around) to make drinking water, but said water was not purified nor potable thereafter.

Test ended when last of 27 dorfs died of dehydration. Caves were breached but test area of 4x4 caves that I did breach did not contain any water it seems. All merchants were robbed of all their load, but second spring ended up badly before any new ones came.

Anyway as the fort slowly died of thirs, the FPS did not return to 160, or above 100, it remained at 60-80ish. Admittedly some animals were breeding a bit, but I doubt it was that significant. The test ended at the late second spring or so, I believe. No elves or other civs were seen.

Anyway, FPS degradation seemed to be permanent even with a small fort. I suspect that the long mine shafts caused more of the permanence of the FPS loss.



Title: Re: Would this fix the blood FPS problem?
Post by: jei on September 20, 2010, 11:03:42 pm
Instead of just boiling blood, why not make it flammable when exposed to air, as well?

Urist McBrewer cancels Brew Drink, got a splinter from the barrel.
*BOOM*

Explosive suicide squad with dwarves that blow up at the first blood they bleed taking the enemies with them?

Might be interesting. But might lead to limbs and equipment flying everywhere...
Title: Re: Would this fix the blood FPS problem?
Post by: Olith McHuman on September 21, 2010, 01:33:50 am
Looking at the source for dfcleanmap, I think what it does is got through the map and replace all splatters/pools/etc. with a null object. I don't think the size of the list of splatters on each tile is reduced. I'm not sure how expensive it is for df to process a null object, but it can't be free.


Instead of just boiling blood, why not make it flammable when exposed to air, as well?

Urist McBrewer cancels Brew Drink, got a splinter from the barrel.
*BOOM*

Hey, it solves the pathfinding problem too!
Title: Re: Would this fix the blood FPS problem?
Post by: Proteus on September 21, 2010, 03:39:15 am
In init settings, there's an option to turn on the FPS counter. Animals being locked up in one way or another will help a bit, but I still claim it's dwarves that dish out most of the pathfinding FPS damage. You can argue there's no conclusive evidence, but plenty of stories tell of how forts can greatly delay FPS damage by limiting population. There are also stories of mature forts with low FPS which suddenly get really low FPS when invaders appear - some people used the FPS counter as an advanced radar for when ambushers spawned on the map as it turned from 20-ish to 6-ish.

One thing not yet taken into account are cavern critters (especially those in unexplored  parts of the cavern,
that exist [in each of the 3 cavern layers] but donīt appear anywhere on your unit menu)
Another possibility would be pathing of HFS (if they already exist before breaching into their location and arenīt all just c5reated afterwards)

The first one definitely requires pathing, probably in a complex terrain, due to the layout of the cavern, with lots of ramps leading up and down
Title: Re: Would this fix the blood FPS problem?
Post by: xellas84 on September 21, 2010, 04:08:54 am
Well there's a simple way to test this theory of the pathfinding being the problem.

Go in to your 2 fps fort.  Turn off every skill on every dwarf (Probably want to use DwarfTherapist for that).  Make a burrow just big enough to hold all the dwarfs, stick them all inside, lock doors so they can't get out.  See if any FPS comes back, what with the pathfinding being truncated away from 90% of the map.
Title: Re: Would this fix the blood FPS problem?
Post by: Zaik on September 21, 2010, 04:15:59 am
In init settings, there's an option to turn on the FPS counter. Animals being locked up in one way or another will help a bit, but I still claim it's dwarves that dish out most of the pathfinding FPS damage. You can argue there's no conclusive evidence, but plenty of stories tell of how forts can greatly delay FPS damage by limiting population. There are also stories of mature forts with low FPS which suddenly get really low FPS when invaders appear - some people used the FPS counter as an advanced radar for when ambushers spawned on the map as it turned from 20-ish to 6-ish.

One thing not yet taken into account are cavern critters (especially those in unexplored  parts of the cavern,
that exist [in each of the 3 cavern layers] but donīt appear anywhere on your unit menu)
Another possibility would be pathing of HFS (if they already exist before breaching into their location and arenīt all just c5reated afterwards)

The first one definitely requires pathing, probably in a complex terrain, due to the layout of the cavern, with lots of ramps leading up and down

If you use dfreveal your unit list will show every unit in the entire embark area. Most places i've used it have5-20 demons wandering below, except for good areas, which i think might be messed up in my install because i never get any wildlife at all outside of cave creatures and vermin, and no demons are there either. I've never pierced HFS in one of them, but who knows if that would even work.