C
ChaosX2
Guest
Hi Everyone,
I'm currently in the midst of constructing an algorithm on how to go about creating an inventory system for my RPG. In my game, each character in the party (total 7) has their own inventory in which they can hold a total of fifteen items. So for example, if you want to use a potion, and only player 2 is holding it, then you must access player 2's inventory in the menu or within battle in order to use that specific potion. Which ever data structure I end up using the item will display:
Name of item
Sprite Index
Quantity held by player
Description of Item
Cost of item to buy (if at weapon/item shop)
Type of item (key item, equip, consumable) - not displayed
I'm having issues figuring out what is more efficient. Should I create a ds_list for each member of the party? Should I create a global 2 dimensional array? Or is there another more efficient method I'm not thinking of?
I imagine that when it comes to weapon and item merchants, a ds_list is sufficient to display the game objects and add them to my characters inventory.
Thanks for taking the time to read this
Thoughts?
I'm currently in the midst of constructing an algorithm on how to go about creating an inventory system for my RPG. In my game, each character in the party (total 7) has their own inventory in which they can hold a total of fifteen items. So for example, if you want to use a potion, and only player 2 is holding it, then you must access player 2's inventory in the menu or within battle in order to use that specific potion. Which ever data structure I end up using the item will display:
Name of item
Sprite Index
Quantity held by player
Description of Item
Cost of item to buy (if at weapon/item shop)
Type of item (key item, equip, consumable) - not displayed
I'm having issues figuring out what is more efficient. Should I create a ds_list for each member of the party? Should I create a global 2 dimensional array? Or is there another more efficient method I'm not thinking of?
I imagine that when it comes to weapon and item merchants, a ds_list is sufficient to display the game objects and add them to my characters inventory.
Thanks for taking the time to read this
Thoughts?