Game Development | The Inventory System That Broke Me

in Game Development3 years ago

inventorysystem.jpg

As far as progress made since last week it’s been a bunch of failures regarding inventory. Usually, during those kinds of weeks, I just don’t end up posting a weekly update. That however does not give those following along a true picture that there will always be setbacks, roadblocks, and weeks where you would be better off doing something else as you just need to walk away for a while.

In last week’s post I had noted that items were not dropping as “random” as they should be. While under a very small system of items this issue was not caught. Now under my large system of items that is apparent.

For a while now I’ve been working on what I’m calling Inventory System 3.0 on my roadmap. It’s an attempt to unify everything and make it all work smoothly between a lot of things.

It needs to handle or work with:

  • Crafting and recipes
  • NPC shops
  • Player auction house
  • Player personal bank
  • Multiplayer server replicates
  • 500+ items
  • Item effects
  • Dungeon player inventory
  • Monster drops
  • Picking things off the ground
  • Chests
  • Questing rewards, pickups, and other things
  • Consumable items
  • 4 different playable classes related to inventory
  • Inventory expansion options
  • 25 different loot tables
  • 50+ items variables
  • Click and drag
  • Item destroy/clean up
  • Character sheet
  • Confirmations
  • Hot bar
  • Multi different row structure types
  • Many different Enumerators
  • Much more

All of that is just the simplified version and I’m sure I’m overlooking quite a few elements from that point of view as well. A lot of things involve inventory in some way or another. Earlier attempts were just the most basic functionality I could get out of all those different things. Many of them did not even work with each other or that well and I was fine with that.

I’ve attempted to understand why my drop chance variable is just not doing what it should be doing. It has caused some rewriting and bricking of the entire system many times over. Some things just don’t like being changed even the slightest without having to go through a bunch of things and resaving them or touching them up.

Then there is the much larger task of trying to compile it all. It’s a very time-intensive operation that takes at least one hour if not longer on my main project.

As a result, I have a testing playground project where things are build out first. The issue is attempted to be found and solved. Compiling can be done in 10 mins. There is less to work with so it’s less confusing. It however is not 100% the true environment so it can’t catch everything.

Then things get migrated over to the main project and integrated. Old systems get removed and replaced with new systems. Everything needs to be retested and hopefully, only minor adjustments need to be made.

This time around that failed. What elements I was testing before moving onto other elements of this system flat out are not working as intended. Trying to compile under the main project has also resolved a lot of new undiscovered issues.

This might be a point in time where I need to re-evaluate what I want in my game and scale back. So it becomes more manageable for myself.

When I do hit a major roadblock like this I usually just go work on other elements of my game. That however is not the case this time around as those things rather depend on this all working together. Otherwise, it’s just going to be redoing a lot more work if I end up making large-scale changes to the systems involved.

So this is the point where I’m going to try and get my mind off things over the weekend. While I usually try and hit weekends quite hard in working on my game. My brain is just too overwhelmed at this point with data.

Other Posts:

Information

Screenshots were taken and content was written by @Enjar. Screenshots are from Unreal Engine 4.

Game roadmap.

Sort:  

Stepping away, no matter how much you really do not want to, can sometimes be the absolute best thing you can do.

Glad you shared your progress still! Those kinds of weeks can really suck. But just have to remember that finding the problems may feel like a step back but it is really still progress that you will learn from.

Scaling down your goals can be a good thing too. You can always add them back later in a more streamlined task. But having that clear picture of the path forward is pretty important. We went through this a couple weeks ago doing the design diagram. Quite a few things were cut right away despite still wanting them. Just to make things more manageable since it is mostly just @mimerr working on the actual game. But we could always add them back whenever we have time. If we decide it is worth it.

Hopefully you get a clear head, come back, and see the flaw right away so you can get back into it. Good Luck!

Thanks, have a great weekend.

I made a 3 level playable demo in Unity last year and inventory was one of the most... challenging parts. At the time I thought that may be because I'm not really a coder, but now I'm thinking it may just be the nature of the beast.

Either way, I believe smooth, easy, fulfilling solutions exist for all problems, and I wish you much success in reaching some. Thanks for sharing your game dev journey! 🙏

I was not expecting it to be this much of a challenge either. At least there is a lot to learn and different ways to go about it. So many different things within UE4 that I had never used before I’ve researched into and even tired using.

I felt the same way when I tackled it, and my inventory was way simpler and less ambitious than yours, lol.

Well, on the bright side you're learning a lot! Wishing you lots of success, however you proceed!

Shared on Twitter.

Inventory and serialisation in general is a very tricky subject, I think though like a lot of these things the difficult stuff is more worth learning and it helps you set yourself out of the crowd. There are millions of people making FPS' for instance but how many developers out there are making an RTS for example? That's how I look at it when it comes to the difficult stuff.

I have quite a few times during this project messed things up with trying to keep it clean. It’s almost understandable all the crazy things game developers end up forgetting about and leaving in a game where the developer thinks the player will never reach.

Hopefully the time invest will pan out someday. For now inventory is still kicking my backside hehe.