ommmmmmm / keeperfx

Automatically exported from code.google.com/p/keeperfx
0 stars 1 forks source link

Treasure room is filled back-to-front, more efficient other way around #192

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When imps mine gems/gold 'attached' to a treasure room, they will place the 
gold in that treasure room not nearest to where they mine, but the furthest 
away.

Not a big deal when the room is small, but when the room is long and narrow the 
impact becomes big.

See for example Level 9: Moonbrush Wood or Level 12: Elvesdance where you have 
a single side of gem available in a long corridor.
Mine towards the gem (in Level 9 the one on the top left of the map), and place 
treasure room in the entire coridor. Notice mining is very inefficient.

Produced in 1.4.3 but has been like this since DK Vanilla.

Original issue reported on code.google.com by Loobinex on 5 Jan 2014 at 4:07

GoogleCodeExporter commented 9 years ago
I did some testing in the Deeper Dungeons Gold, and there this issue is not 
present. There the imps can fill the closest tiles and gold is extracted from 
that end as well. This gives the blue keeper in level Morkardar a lot more gold 
and he uses this to train his creatures better than in KeeperFX.

Original comment by Loobinex on 2 Jan 2015 at 12:13

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
To explain some of the mechanics behind this issue:

In original DK, gold slabs are filled from first slab (first on a list of room 
slabs) to last. But which slab is first?
- If a room exist from the map beginning, then first slab is top left, and then 
next slabs go in lines towards right.
- If room was built by computer player, then first slab is central one (as 
computer player starts building rooms at center).
- If room was built by human player - it depends on how the player built it; 
often it's first one placed, but if a player had two rooms in a moment and then 
built a slab between them resulting in room merge, things get complicated.

Also, in KeeperFX the mechanics is a bit different (it worked like in original 
DK when the issue was created). In KeeperFX, slabs where items are placed are 
chosen randomly, and same goes to taking money from a room - random slabs are 
cleared.
Well, actually for taking money there is a bit of order - the game first tries 
to grab gold from a slab at border of the room, and only if that fails gold 
from central slabs is used.

To conclude:
There is no back-to-front filling/emptying of rooms. But also not the closest 
slab is selected.

Original comment by mefistotelis on 3 Jan 2015 at 1:01

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Attached is my long treasury test map. Start it in KeeperFX and tag gold to 
dig; notice the treasury is filled ramdomly.

Could you try this map on DD to confirm if the treasury is filled from front?

Original comment by mefistotelis on 3 Jan 2015 at 1:35

Attachments:

GoogleCodeExporter commented 9 years ago
OK, I could have sworn it was filled back to front, but it appears I am 
mistaken. About the DK mechanics as well.

What would still be an improvement is if imps on their way to drop gold reach a 
treasury-tile, they drop the gold there instead. This would improve efficiency 
and as such help out computer players.

Right now it would still be most-efficient to build many small treasuries 
causing the imps to select the closest room.

Original comment by Loobinex on 3 Jan 2015 at 1:37