Hi! I need some help here, not programmatically cause I am very familiar with Playmaker but technically related to Hash Tables and Array lists:
I am working on inventory, something like in Gothic 2 where you have chest items on the right side and inventory on the left side. When picking items from chest they will spawn in inventory with automatic list sorting and positioning by name on the screen, you can see in image provided what I am talking about. If I mouse over items they will scale and item information will be displayed on the bottom of the chest or inventory (depends on where the item is). By clicking items in chest they will be added to inventory hash tables and to number count hash table and vise versa they will be stored in chest by clicking them in inventory if chest is opened. This is system is fully working without bugs but still I have problems due to the hash table lag. Tried many different solutions, with planes instead of GUI textures and also with only text but none solution solved lag problem.
The inventory system works this way:
When item is clicked, it will set event properties (just item name) and send event to chest to subtract item from Chest Hash Table and to add it to Inventory Hash Table by get / set hash table. After that chest system will get event properties (store item name) destroy current chest list and create another empty list, then get hash table keys in array list and then loop by ArrayListGetNext through list by until it get's all items. 20 Items to loop is enough for me cause I can use loop index from 0 to 20 but still have that lag when clicking fast on items. Current inventory is made by 16 items loop, you can see on images bellow!
So I need technical help, did you test how many items can be looped through hash table instantly cause more items I have the greater lag will be.
Also if you want to see what I am talking about just use that Array Inventory Example and try to add 20 - 30 items to the loop system and you will get lag.
If hash tables and arrays can't support more then 20 - 30 items then what can I do, is there any other way for doing those things instead hash table / array list GetNext?
Gothic has 35 items in inventory and chest at the same time which is 70 and items spawn instantly when clicked .
I am planning to use this system to storage, shop and item transfer from chest to inventory and vise versa but I can't create bigger list due to the lag, when have 9 items in chest and 9 items in inventory then I don't have lag but more then that lag will start little by little.
Can anyone help me here or can you check those Hashtable systems, or JeanFabre can you somehow reduce that lag by checking HashTable / ArrayListgetNext?
If you solve this for me then you will see soon some very great game created only with Playmaker and I will be very grateful to you
Thanks in advance!