Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

There are some interesting bugs in the inventory handling that suggest a suboptimal implementation.

Clicking on an item doesn’t use that item, it uses the first item of that type in the inventory list. That changes the positions of inventory items before the cursor, which throws people off when clicking several items.

And if you have a huge number of herbs, clicking a cauldron takes a long time.

Based on that, I’m guessing that you search for items from the beginning every time, making the cauldron at least O(n^2).

Clicking an item should remove that specific item, and shift the remaining items up by one. And the cauldron should walk the list, remove all items of a type in one pass, and then add that many of the new item.

(+1)

Thanks, those issues are on our list.

Code for the herb removal:

int countRemoved = itemList.RemoveAll(i => i == item.ItemReplaced);
for (int i = 0; i < countRemoved; i++) AddItem(item.ItemReceived);

My guess is that we are updating UI for each item removed which forces UI to redraw, we will fix it in the next update.