2010
08.20

Deadlines and looting

Ok, fogbugz is not trusting me anymore and starts to lower my odds on releasing on Sept, 19 as seen on the report below… 79% bah still not bad… Except if I inadvertently power the fluffotron on again… 😀

At least I finally have a crudely working looting system. There is still a lot to polish (for example a “Take all” button wouldn’t hurt…) but you can do the basics : exchange items between your inventory and a static container like a chest.

Since the chest dialog and the inventory are implemented by the same class, this was more tricky than expected. For example, the default action (left click) in the chest is to move the item to the player’s inventory. When the chest is open, the default action in the inventory is to move the item to the chest instead of using it. And the right button context menu also depends on the type of inventory. There are some actions that make no sense in the chest. I don’t even mention drag and drop actions that do not work at all with the looting screen now, but in the end, you should be able to throw an item from the chest without having to put it in your backpack first, or combine one of your backpack item with one in the chest and so on… This probably leaves some sporadic work and bugs for the next few months.

So now that I have a chest I can put a blade inside, the idea being that the player can disassemble his starting knife and replace the poor blade by a better one. And that’s where I stumble on another pitfall… The naive idea was to have a list of recipes that define the item operations :
blade + handle = knife
Thus you can easily disassemble a knife into a blade and a handle. But what blade quality ? Does the handle have a leather sleeve ? The recipe does not tell. When you create the item, its properties depends on the quality of the components you use, but the resulting item properties are not sufficient to tell you what exact components were used, so you have to store all the components in order to be able to retrieve the right ones when you disassemble the item… Of course, this is only required for items that were crafted by the player. For a knife found in a chest, you can defer the generation of the components to the moment of the disassembly, saving memory during the life of the item…

The 30 minutes in fogbugz that I had estimated for the disassembly action have turned into 4 hours and I’m not even sure they’ll be enough.

Once I have my hunting knife, I’ll be able to start coding the game (herds, stags), then fighting, then meat and leather, then spark spell, then campfire, then cooking, then hunger, ……….

2 comments so far

Add Your Comment
  1. My first reaction to the player-crafted item issue is to always ensure there is some small quality loss when disassembling items, so that you do not have to store exact item ingredients. That way, you can get away with approximating (and “rounding down” to prevent exploits) the item ingredients when disassembling.

    However, this does not address the issue of subtle differences between item ingredients, such as a wooden handle and a leather-sleeved handle. For that deconstruction to work properly, you’d indeed have to store item ingredient details, which is my preference and how I’ll end up implementing item creation in Dance of Death. Alternatively, you can find a way to work all of the relevant ingredient properties into the resulting item, so that there’s a clear one-to-one correspondence when assembling/disassembling, though I fear this might create more problems than it solves.

    Ultimately, you can do away with disassembly altogether, or have it return only the portion of the ingredients you can reliably deconstruct (eg. only the blade in your example).

    Best of luck for the September 19th ARRP release!

    Ebyan “Nolithius” Alvarez-Buylla
    http://www.nolithius.com

  2. Indeed each time you disassemble an item, the component should lose some quality until they’re completely destroyed. This is needed to keep the player’s stash from growing indefinitely. Btw I’ve just played your game and it’s great ! I’ve made some remarks on your blog. Good luck with version 0.6.