Today I decided to finish up the refactor for the new UI manager, but it turned out all that was left was removing two lines of code. If only I had realized that yesterday! So instead I dove into the next big thing, in-game items! I'm approaching items and the player inventory a little differently than many. I don't plan to let the player directly interact with their items, so no need for click and drag or stack sizes.
Because of this, I decided to begin refining exactly what is needed to define an item, and how I'll be storing that information. I began by describing what I expect of an item, how there will be different types, some will be generic while others will be unique. I defined what data the game would need to know for a basic item, as well as the kind of data surrounding the unique items.
Then I talked about how I wanted to build this data set. I also decided that even though the unique items would mostly be procedurally generated, I'd still need to build a few manually myself. My initial idea was to use a simple form to build out a CSV file, but I knew JSON was a common approach.
After much discussion with Gemini, I came up with a decent approach. I'm storing static item data in a JSON file. This item definition is going to be expandable to encompass other item ideas I have for later in the game. But this beginning is needed before I can start working on my inventory system, which is needed before I can begin working on my save/load functionality. It's an interconnected mess!
The next step was building out a data manager, to be able to read and interpret the item definitions. But there was an issue of the approach. I'd been at this for a couple hours already and I was going to have to dive into the game manager again. This thing is already giving me headaches and I know there's still so much to add. But, with the fact that the game needs to load this data, and probably a lot more, I need to change the way things work, again.
So, instead I'm taking a break and I'll be back tomorrow. At that time, I'll change up my game's flow again, this time to add an initial loading screen instead of loading straight to the main menu. And during that loading screen the game will load the item data (and whatever else is needed in the future). But that's tomorrow's problem.
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.