OK, since I'm still learning and everything is new to me, Arrays... Dictionary... and more.
I'll try to share my progress consider to this Items idea based on my game-engine because I don't use inventory. maybe it is MUCH more simple to accomplish and your advice will be very helpful.
As shown in the GIF, When the player pickup the question-mark sphere a.k.a. "Randomizer".
Next is the tricky part (for me)
- As I keep working on the game I will add MANY MORE ITEMS.
Just like the original post, I will need to "tag" somehow some items to different rarity:
Common, Rare, Legendary.
- Each item will do something else of course.
In this case (Example GIF) the "Spring Helmet" will make the Player jump Higher.
What I've done so far is no Arrays, no Variables or anything for the items because I want to make it on the best cleanest way that it will be easier for me to manage, modify, change, replace in the future.
1 - Should I keep the ITEMS in 1 sprite, each item is different animation with dedicated name?
or should I separate to 3 sprites: Items_Common, Items_Rare, Items_Legendary for better management?
2 - Do I even need to use Array? can I use ONLY dictionary?
I'm asking because the Array doesn't make any sense to me, the concept of X, Y (I don't need the Z depth) but have no idea how to call it and such. (still learning from experimenting).
From reading about the Arrays and Dictionary, I understood that searching in Arrays is slower compare to the Dictionary or normal Variables, and I will have MANY items (and will keep expanding in the future) so what will be the best?
3 - How do I make for each Item a different "power" because it will need different group of events.
Should I add Variables on the "Items_Common" for example? I'm lost where to add variables or not.
4 - What do I do next?
Once the player pickup the "Randomizer" I want it to choose from either Common, Rare, or Legendary based on what the Player already unlocked in the game (I didn't got to this part yet, that's another problem).
I hope you understand my goal and can help me out with good advice as I do step-by-step while learning and experimenting.
Thanks ahead and sorry about my bad English.