Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 12 13 [14] 15 16 ... 18

Author Topic: !!SCIENCE!! Thread: Operation FPS Bomb  (Read 90494 times)

GeorgiaPeanuts

  • Bay Watcher
    • View Profile
Re: !!SCIENCE!! Thread: Operation FPS Bomb
« Reply #195 on: March 22, 2012, 03:36:20 pm »

I highly doubt the items would just be stored in some giant vector. Even at minimum something where specific item types store themselves as a separate vector.

I'd think something like a cached octtree would be ideal too having a dorf find a needed item nearest quickly as he could quickly eliminate whole regions of the map as not containing said item. So instead of having to iterate a whole list of an item to determine the nearest you just trawl through an octtree till you reach the closest leaf node.
Logged

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: !!SCIENCE!! Thread: Operation FPS Bomb
« Reply #196 on: March 22, 2012, 04:28:17 pm »

I highly doubt the items would just be stored in some giant vector. Even at minimum something where specific item types store themselves as a separate vector.

I'd think something like a cached octtree would be ideal too having a dorf find a needed item nearest quickly as he could quickly eliminate whole regions of the map as not containing said item. So instead of having to iterate a whole list of an item to determine the nearest you just trawl through an octtree till you reach the closest leaf node.

The DF Hack guys have been pulling apart and labeling the code, though, and they did identify a global item vector.  See: https://github.com/peterix/df-structures/blob/master/df.world.xml#L297

It seems as though there are several psuedo-redundant types of item vectors, however.  So, there are things like a global vector for temperature purposes, but then another vector just for boulders, and other vectors for sectors of the game map for local area checks.
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

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: !!SCIENCE!! Thread: Operation FPS Bomb
« Reply #197 on: March 22, 2012, 10:27:11 pm »

I am concluding the vaporization tests.

My memory use actually went down.  Saving then reloading, it went back up.  There appears to have been no memory leakage at all.  Vaporizing stone is perfectly safe for FPS, as tested with several million stone vaporizations.
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

Psieye

  • Bay Watcher
    • View Profile
Re: !!SCIENCE!! Thread: Operation FPS Bomb
« Reply #198 on: March 22, 2012, 11:27:39 pm »

i'm pretty sure it runs in different processes, not threads.
keep up the good work, but tell me... do i dfhack autodestroy or melt or ... your last data shows no difference between the methods , correct?
If you must use DFhack for quick item destruction, teleporting them into an atomsmasher with autodump is slightly better than "autodump destroy". Though you are recommended to save, quit and load.
Logged
Military Training EXP Analysis
Congrats, Psieye. This is the first time I've seen a derailed thread get put back on the rails.

MarcAFK

  • Bay Watcher
  • [INSANITY INTENSIFIES]
    • View Profile
Re: !!SCIENCE!! Thread: Operation FPS Bomb
« Reply #199 on: March 23, 2012, 01:01:51 am »

Posting to watch.
I've been meaning to run something like this myself, and i'm loving the informating gleaned from this so far.
However wasn't a bug recently fixed that caused fort FPS to slowly become unusable, what if all this testing is only going to show what temporarily screws up FPS, but it turns out the slow fpsdeath problem has actually been fixed?
That said any insight into what causes actual FPS loss temp or otherwise is significant and very useful.
Logged
They're nearly as bad as badgers. Build a couple of anti-buzzard SAM sites marksdwarf towers and your fortress will look like Baghdad in 2003 from all the aerial bolt spam. You waste a lot of ammo and everything is covered in unslightly exploded buzzard bits and broken bolts.

Elone

  • Bay Watcher
    • View Profile
Re: !!SCIENCE!! Thread: Operation FPS Bomb
« Reply #200 on: March 23, 2012, 02:10:26 am »

What if you set all those unit files to readonly? I'd science that but I dont know about all the specifics (i did not even know that it would give an error or that its okay to copy the old stuffs). Besides, my clothing is STILL not modded out, does anyone have a handy link on how to do that? I'd prefer it short and factual, because I've sought such guides before and I found them incomplete, as if you already have to know what you are doing to understand the guide, except there's no point then. So far I have removed clothing and subterranian clothing tags, and still embarked with clothes.

One more thing, one that no one seems to ever mention. If you embark with no clothing, doesnt that make your dorfs tremendously squishier? Like, even their constant pushing with animals could be harmful, as I've seen it mostly blocked by clothing otherwise?

Although, hopefully it becomes moot soon, if the clothing fix turns out to be what we expected. And I agree with the line that says that it will likely turn out to be something that we expected, like tons of items, or clothing.

Ah! How does one disable actual historical figures? Any easy way (like removing vampires) as opposed to genning a 2 year world?
Logged
▼ It's all their fault. ▼

schismatise

  • Bay Watcher
    • View Profile
Re: !!SCIENCE!! Thread: Operation FPS Bomb
« Reply #201 on: March 23, 2012, 03:16:29 am »

Besides, my clothing is STILL not modded out, does anyone have a handy link on how to do that?

Simple, my friend!

I find the best way to do it is simply turn clothing into armor. This has the effect of stopping your dwarves from claiming or wearing clothing, unless it is specified via military uniform. This should only take you 1-2 minutes.

Find the 5 raw files (.txt files) that pertain to the 5 main types of body protection - in raw/objects, these are:

item_armor.txt
item_gloves.txt
item_helm.txt
item_pants.txt
item_shoes.txt

In each of these files, add [ARMORLEVEL:1] to each item that doesn't already have an [ARMORLEVEL:x] tag.

Example:

Spoiler (click to show/hide)

Simple as that.

Edit: The best part of this, of course, is the ~10-20% FPS gain you get due to the clothing wear bug. Of course, it's all fixed in the coming patch, anyway.

One more thing, one that no one seems to ever mention. If you embark with no clothing, doesnt that make your dorfs tremendously squishier? Like, even their constant pushing with animals could be harmful, as I've seen it mostly blocked by clothing otherwise?

Cloth provides very little protection. I've been running military forts without clothing for a while now and haven't noticed any difference at all.
« Last Edit: March 23, 2012, 03:23:39 am by schismatise »
Logged

kaijyuu

  • Bay Watcher
  • Hrm...
    • View Profile
Re: !!SCIENCE!! Thread: Operation FPS Bomb
« Reply #202 on: March 23, 2012, 03:55:17 am »

The attacked that glance off clothes will do pitiful damage to an unclothed dwarf. Some dents and bruises, maybe.
Logged
Quote from: Chesterton
For, in order that men should resist injustice, something more is necessary than that they should think injustice unpleasant. They must think injustice absurd; above all, they must think it startling. They must retain the violence of a virgin astonishment. When the pessimist looks at any infamy, it is to him, after all, only a repetition of the infamy of existence. But the optimist sees injustice as something discordant and unexpected, and it stings him into action.

Elone

  • Bay Watcher
    • View Profile
Re: !!SCIENCE!! Thread: Operation FPS Bomb
« Reply #203 on: March 23, 2012, 05:19:58 am »

Yaaay! That's precisely what I wished to have! After seeing such a super simple little guide, I start wondering why all the others had to take up a screen or more =O !

Now, if I get the unit files and set them to readonly, and it DOESNT mess my game up, that's two fps decay issues gone already. lthough for obvious reasons I am not quite keen on staring a new fort now. Soon enough, all of this might change.
Logged
▼ It's all their fault. ▼

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: !!SCIENCE!! Thread: Operation FPS Bomb
« Reply #204 on: March 23, 2012, 10:38:10 am »

Minor damage is still something that causes pain, however.

An elephant can be knocked unconscious and killed by three hoary marmots, just because the game has no way of differentiating the amount of pain generated by having a giant slash across your whole arm, or a tiny nibble mark from something weighing in at 0.002% of your body mass. 

It's like being killed by fly bites. 
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

Elone

  • Bay Watcher
    • View Profile
Re: !!SCIENCE!! Thread: Operation FPS Bomb
« Reply #205 on: March 23, 2012, 11:44:53 am »

Yeah, I remember a thread where someone discovered that a bunch of bunnies can knock out anything that feels pain by gnawing. Then someone thought it not damaging enough, and put bunnies on fire to gain the extra efficiency from it.
Logged
▼ It's all their fault. ▼

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: !!SCIENCE!! Thread: Operation FPS Bomb
« Reply #206 on: March 25, 2012, 09:19:12 pm »

OK, so I did some more liquid rock tests, and they don't get cleaned up at the end of the year - don't melt things, kids, they never go away!



I took too long of a break on this testing stuff, can't remember what else I was going to test.

I know I wanted to test engravings, and then test socks, maybe engraved socks. 

After that, it would be large-scale crittercides. 

Can't remember what else I needed to test.
« Last Edit: March 25, 2012, 09:21:52 pm by NW_Kohaku »
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

MarcAFK

  • Bay Watcher
  • [INSANITY INTENSIFIES]
    • View Profile
Re: !!SCIENCE!! Thread: Operation FPS Bomb
« Reply #207 on: March 25, 2012, 10:12:10 pm »

I would like to test constructions, i have a suspicion that somewhere in the game might still count them as objects that need to be checked frequently enough to cause lag. I'm thinking of a way of testing this with minimum of variables. Perhaps Modding a game to remove caverns, clothes, invaders, traders all the uncontrollable stuff etc. Then simply dig out whole levels and replace them with solid blocks of stone. I would compare framerate/ram usage before the digging, after digging (atomsmash all stones to get a clear reading on the difference from having all that mined space), then using a custom reaction i would create enough stone to block off all the mined space checking the fps/ram at this point also, then finally build it all and check FPS/ram once more too.
Also going by what's been discovered earlier i'll need to conduct before/after save/quit/reload Fps/ram checks just to be thorough.
This should show if theres some difference since even a 2x2 embark would have 2209 tiles to build.
For better results i might continue the test over 5 levels.
Logged
They're nearly as bad as badgers. Build a couple of anti-buzzard SAM sites marksdwarf towers and your fortress will look like Baghdad in 2003 from all the aerial bolt spam. You waste a lot of ammo and everything is covered in unslightly exploded buzzard bits and broken bolts.

expwnent

  • Bay Watcher
    • View Profile
Re: !!SCIENCE!! Thread: Operation FPS Bomb
« Reply #208 on: April 02, 2012, 10:56:34 am »

A few thoughts, assuming you're right:

1. Even if you have a huge array like that, it's completely possible to minimize this effect: just use a skip list (google will probably have better descriptions than I can quickly give). This would make the effects of "holes" in the array minimal. If Toady does this, it would be difficult to measure the effects because they'd be so small. He could also "defragment" the array any time he needs to iterate through the whole thing, but that might mess things up if other things have indexes into the array instead of pointers to the actual objects the array points to.

2. Even if he doesn't do this, it could be that the end of the array gets trimmed properly when things are deleted from it. It looked like in a lot of your tests, you just mass-produced one thing then deleted that one thing in various ways. A better way might be to mass produce two things, then delete one of them, and compare against mass-producing just one thing.

3. It could also be a giant hash table that he never decreases in size, so searching for things that aren't there would take longer and longer (slightly) as the size increases.
Logged

Kogut

  • Bay Watcher
  • Next account: Bulwersator
    • View Profile
Re: !!SCIENCE!! Thread: Operation FPS Bomb
« Reply #209 on: April 02, 2012, 11:16:34 am »

Or there is a garbage collector effect on saving/loading (confirmed in my test) - probably degenerated vector/sth else is saved and on loading all gaps are removed. And I must say that my new fort is progressing nicely as I keep total item count below 10k.
Logged
The worst bug - 34.11 poll
Tired of going decades without goblin sieges? Try The Fortress Defense Mod
Kogut, the Bugfixes apostle of Bay12forum. Every posts he makes he preaches about the evil of Bugs.
Pages: 1 ... 12 13 [14] 15 16 ... 18