So I made a big decision about the game yesterday… But it didn’t really come into play until today.
I did a ton of research about how real MMOs handle game data. See, there’s a million different ways of storing the game’s data – and by data, I mean things like “Item 1 is a health potion that restores 50 health.”
Some games put that into a json file – json files are plain text files with a predictable structure and they’re specifically written to be human readable. Those games tend to be highly moddable so that if you wanted to write a mod that changes that potion to restore 75 health, it’d be easy to find out where and how to do that.
Some games put that into an external database. It’s the most secure place to put it, it can’t be tampered with by any means, it could be edited quickly and easily (by someone who knows the complex table structure, of course). The drawback is that it has to be read back out of the database regularly, which gets expensive – both in time and money. And time is money.
Some games put that into the game files themselves. This is halfway between the two options. That data gets encoded with the rest of the game files and is included for free, but it can’t be easily modified. It’s not quite as secure because the file is still in the game files somewhere, but it’s also just automatically loaded up with the game at the start, and every other file in the game can reference it just for free, no expensive database calls necessary.
I initially went fully down the path of an external sql database. I wanted to write everything into the database, force the clients to load them out every time they connected, and desperately try to protect my data hoard.
I did some research into how the giants are doing things these days, and it seems like they’re using a mixture of approaches and some very strict server-client separation.
There’s a lot of data in my game that never changes, and all of it was stored in my sql database… But it seemed like it didn’t belong there. It seemed like it belonged in the game files, so that both the server and client could access them at-will.
So I went all-in on transferring my data away from sql, and into static files in the game.
I spent a lot of time on this today, and… I’m not sure. I’m not sure if it was the right approach or not. I feel myself shifting back toward the database-driven approach. My gut is saying that’s the right call.
That being said, the work I did today wasn’t waste. I did a bunch of data structure massaging, into a form that’s definitely going to stay permanent. I ended up with some better and more consistent code across the board, and some that’s more extensible, too.
You said you were gonna work on gameplay more though…
I did, which is why I did all that stuff in the morning before I streamed, and then later in the afternoon, I got back to work on inventory and using items!
So the first step was getting the new inventory button to see user input. Eventually we’ll need to right click that button and open a menu on it.
While I was setting that up, I started setting the stage for more things too, like that hover menu, the data needed to actually use the item, and about what effect it’ll have.
Then, when it was time to start setting up that hover menu …
The power went out and I couldn’t work for 6 hours
But I’m not gonna just leave you hanging, so after those 6 hours, I did fully jump back in and basically rewrote a ton of the code pertaining to the Hover Menu.
The Hover Menu was previously written to only work with commands for things like other players, NPCs, gathering nodes… things in the world, in the 3d space.
I needed to rewrite it so that it could be used for anything. Basically it needed to be able to just be given a list of commands without knowing anything about what those commands are used for. It can just fire off a signal saying “Hey whoever’s listening, the ‘Use’ button was clicked!”
So now the hover menu is a lot more extensible, meaning I could even expand it to work for other purposes.
That being said, it’s not finished. The “Selectable” system – that is the system for interacting with objects in the 3D world – still too closely coupled with the hover menu and I’ll need to refactor some of that system before the item menu will fully be able to work.
But at least it looks alright!

Oh right, I almost forgot
I did another cool thing this morning, which was that I wrote an editor tool to automatically generate signals for me.
Signals are a pain in the ass to write in C#, and even though I should be using them for literally everything, I don’t use them enough because they take so long to write that I end up talking myself out of using them.
So now all I have to do is type two little words into two little boxes and those boxes will use those words to generate some signals for me. It will even extend other signals I’ve already made, which is very very cool.