08.20
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, ……….






