Make an Inventory system in Unity

Effie GameDev DK30 Fall 2020 2 2

Description

I’d like to cut my teeth on Unity development by making an Inventory system. I know how to program and have made games in RPG Maker before but I’d like to learn Unity and go further. I love organising inventories like in Resident Evil 4 or UFO: Enemy Unknown so I’d love to make one of my own!

Recent Updates

Effie 4 years ago

Finished Irregular Items! I was pretty intimidated by this, but it didn’t turn out to be too hard, just made a new subtype of items that have a little list of coordinates for points they occupy, rather than bringing back a whole rectangle like other items.

That’s everything I set out to do! Although there are a bunch of other features and ideas I’ve had since starting, and I might end up endlessly tinkering, I’m happy to say I’ve completed my original goal!

https://youtu.be/3VPkbhuB5mg

Effie 4 years ago

Completed stacking items. Had a lot more difficulty than expected getting the text display to show numbers, but got there in the end. Think I need to rethink how the coin animations work, but overall I’m super happy, think I’ve pretty much achieved all the stuff I set out to achieve except maybe irregular items.

https://youtu.be/8tV8z7uuc60

Effie 5 years ago

Rotation!! This turned out to be easier than I expected. Visually, just had to give Unity a simple rotation thing, which it was pretty good at, and for figuring out which coordinates the object occupies was just a case of swapping the height and width. Irregular objects still threaten to be a total nightmare, and I’m not sure where to begin with adding a stack size indicator, but glad to knock this one off quickly!

https://youtu.be/g6ww4xbGPS0

Effie 5 years ago

Implemented big items! 2x2 items can be placed and you can’t place items on top of them or vis versa

https://youtu.be/U5MEfJk1Gf0

Effie 5 years ago

Added items! Items can be moved around and placed, can’t be placed on top of one another, and the content and layout of the inventory is saved between sessions via User Preferences

Effie 5 years ago

Got the inventory grid set up and managed to move the cursor smoothly from square to square precisely on the pixels, and prevented the cursor from leaving the grid!

Estimated Timeframe

Oct 15th - Nov 12th

Week 1 Goal

Make the inventory grid, cursor, get it to load, be able to move the cursor around using keyboard or joypad, and it should move in a grid-based fashion

Week 2 Goal

Implement 1x1 items in the inventory grid, select and move them with the cursor, prevent placement of multiple items in the same location Implement save and load inventory from disk

Week 3 Goal

Implement large square items (2x2, 3x3), make them obey placement rules appropriately Implement stacking for appropriate items, including display of stack size (but not bothered about stack splitting etc)

Week 4 Goal

Implement long items (2x1, 3x1), including Rotation Implement irregular items (i.e. “L”, “T” tetrimino, or cross shapes).

Tags

  • Unity
  • Pixel Art
  • Learning