Author Topic: I've made an Array-less Inventory system  (Read 1101 times)


  • Junior Playmaker
  • **
  • Posts: 75
    • View Profile
I've made an Array-less Inventory system
« on: March 28, 2017, 04:21:00 AM »
Hello all! I just wanted to share something really bizarre and cool, I made an inventory system without using arrays which stores game objects, strings, UI, and meshes. I wanted to see if it was possible to make an inventory system without arrays. I did it just for fun and I managed to get it to work! You can pick up and drop items.

I used 4 FSM's and broke it down in this process: Inventory processor, Item select, Item drop & Item Queue.

This was fun to make, I hope this gives some of you guys an idea on how to do array-less inventories.
« Last Edit: March 28, 2017, 04:22:45 AM by mrminico »


  • Administrator
  • Hero Member
  • *****
  • Posts: 13622
  • Official Playmaker Support
    • View Profile
Re: I've made an Array-less Inventory system
« Reply #1 on: March 29, 2017, 02:08:11 AM »

Thanks for sharing this.

 But I am wondering why you don't want to use arrays, in your implementation you constraint yourself with a given amount of items, 4 in your case, if your game logic requires one more item, then you have to edit all these fsm and test again, whereas if you use array, the list of items can grow without you touching the logic behind your inventory. It's really something I strongly advice to do. and if you must constraint inventory with 4 items mx, you can do so by creating a int variable called "max number of items" can then check if the array contains more or less than this value and act accordingly in the interface to prevent further picks, etc