Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Vaults - FPS friendly storage idea that might be better than QSP  (Read 1164 times)

Evans

  • Bay Watcher
    • View Profile
Vaults - FPS friendly storage idea that might be better than QSP
« on: September 18, 2016, 05:29:18 am »

Hello,

Been some suggestions made here:
http://www.bay12forums.com/smf/index.php?topic=158630.msg7036706#msg7036706
http://www.bay12forums.com/smf/index.php?topic=149714.msg6127084#msg6127084
http://www.bay12forums.com/smf/index.php?topic=139639.0

I would like to elaborate on the idea and suggest the following:

A building called "Vault" that would be build in the same manner as a bridge (uses resizing).
Is actually a building that can be made from logs (level 1) stone blocks (level 2) or steel bars (level 3, indestructible).
Each tile requires a single building item as with the floor.

The vault would be used to store non quality items(important!), that would be:
- logs, blocks
- raw stone
- metal bars
- basic leather?
- coal, soap, ash,potash, pearlash
- raw ores
- maybe uncut gems?


The Vault would operate with the following principles:

1. total storage area is calculated as number of tiles * number of tiles per a storage tile. That means that 10x10 vault would hold a 100 * 100 items.
That is 10 000 items stored in the vault.

2. Items would not be stored as physical objects but as an entry on the list.
That means once, for example a stone, is moved to vault, it is removed from the world as physical object and appended to the list of items in the vault.
No temperature/gravity/whatever calculations are performed on it.
Since this is a list with entries, only non-quality items are allowed to keep number of entries short and sweet.

3. Vault would check for strange moods and other jobs normally.
Goal is to store items and use them as needed, not freeze them from game world.

4. If the vault is destroyed, items are being created back, possibly killing FPS.
Strategic thinking is required.

5. Vaults can take/give to a pile or workshop.
Again, idea is to optimize the storage not to freeze the items. Once the job is created, the dwarf goes to the Vault, item is created and entry removed from the list, dwarf picks up the item.

6. Items can be moved between vaults (obviously) to allow players for smooth upgrade of their storage (say from stone vault to metal ones).


While I do appreciate the complexity of the game as it is, the current issues with FPS caused by multiple objects are making it unplayable later on.
With the above implemented we would lower the impact on calculation tremendously, as every player is expected to posses many of the above items even though they do not always intend to stack on them - mining, trimming hostile trees near defenses, burning trash etc etc all produce items that are then being processed by the game even if all they do is just sitting idle in stockpiles.

While dwarven atom smasher and QSP do provide some solutions to the problem, they are both technically speaking - exploits of the current game mechanics.
They also require multiple hauling jobs (dumping especially).

Adding vaults that store items as an entry on the list with a multiplier (granite x10 for example) would lower the need for the above and increase the FPS in general.
« Last Edit: September 18, 2016, 06:41:44 am by Evans »
Logged
getlost.lua # How to get rid of tavern guests
function getlost ()
   local unit = dfhack.gui.getSelectedUnit (true)
   unit.flags1.forest = true
end
getlost ()

Jasoba

  • Escaped Lunatic
    • View Profile
Re: Vaults - FPS friendly storage idea that might be better than QSP
« Reply #1 on: September 18, 2016, 03:29:12 pm »

I dont know how much fps you gonna safe that way.

The list would be a mess... Kinda like the Z stock menu. Constantly updating multiple vaults might just even out the fps gains you get from path finding cuts.

This would work if the game was designed with vaults in mind. Right now i dont think it would help (that much)

Also produce smart. I know its temting to auto repead the mason an let him build 1000 thrones. But even with Vaults this is going to be a mess. Eventually vaults will fill and they are just another stockpile except they ALSO have this list that has to update everthing with quality + studs etc. It might work fine with 1 full Vault but if you have more i think it will drain even more fps...


Btw: Im running an fps fort atm and i use DFhack alot to push my fps. ->autodump destry, cleanowned scattered X, clean all are your firends.

Logged

Evans

  • Bay Watcher
    • View Profile
Re: Vaults - FPS friendly storage idea that might be better than QSP
« Reply #2 on: September 18, 2016, 04:20:28 pm »

Please read carefully.

I said that vault are only for NO QUALITY items precisely to avoid the issue you are mentioning.
It concerns the items you will get anyway (Stones, logs, ore - from mining and cutting the area around the walls).
The point is to move them out of the computing way without need to atom smash them.

I never build 1000 thrones and regularly dump any excess to depot. I use clean command alot anyway.

The point is... this doesn't have to be that way. List is fairly static, because its just a stockpile entry with numbers next to them, no objects are lying inside the stockpile having their temperature recalculated every now and then.
Just an array with a simple pairs.
Logged
getlost.lua # How to get rid of tavern guests
function getlost ()
   local unit = dfhack.gui.getSelectedUnit (true)
   unit.flags1.forest = true
end
getlost ()

Jasoba

  • Escaped Lunatic
    • View Profile
Re: Vaults - FPS friendly storage idea that might be better than QSP
« Reply #3 on: September 18, 2016, 07:15:00 pm »

Ok sry didnt read that well xD

Yah ok this sounds resonable. I just use autodump destroy for all that excess stone.
But I get sad when I have to destroy ore. So I would welcome an ingame solution!

 
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Vaults - FPS friendly storage idea that might be better than QSP
« Reply #4 on: September 21, 2016, 05:35:35 am »

Just an array with a simple pairs.
That is what essentially a stacked item is - I think there have been few suggestions for autostacking?

Two issues: 1: most jobs aren't really able to handle input material[100] reasonably. Bone stacks get split fine, but masonry makes just 1 throne from gabbro[100]. On the other end of the spectrum, adamantine strands[100] get converted to 100 wafers with 1 job.

2: If every such thing is in that list, I can see potential job cancellations when a resource becomes tasked for 1 job, thus stalling others.

Evans

  • Bay Watcher
    • View Profile
Re: Vaults - FPS friendly storage idea that might be better than QSP
« Reply #5 on: September 21, 2016, 06:01:36 am »

1.) As I wrote, when a job is created a dwarf goes to vault and picks up a single item.
Gabbro 100 becomes Gabbro 99 and one singular object is spawned at the dwarf (the "physical" stone for the dwarf to pickup).
When not used those items do not exist in any other way than an entry on the list and are not subject to changes in temperature, gravity, flow etc.

2.) it depends on how it will be handled. Single vault can have more than 1 pickup/drop-off point.
Code wise, resource is not tasked for the job, it is being created and then tasked once dwarf gets to it.

Again point is to move DF "physical" items into the RAM limbo, where no calculation other than availability for a job is performed on them.
Logged
getlost.lua # How to get rid of tavern guests
function getlost ()
   local unit = dfhack.gui.getSelectedUnit (true)
   unit.flags1.forest = true
end
getlost ()