Refactoring is a technical term that, in short, means to clean code up. Sometimes when we’re coding an application or – in my case – a game, we get hung up on the end result. We want people to be able to experience the game and enjoy it for all that it is. We also forget about how important it is to write readable code, so we throw everything onto the page and once it works, we run away, holding our hands to our ears and pretending there’s no problems. The truth is, the code could work fine, but later when we need to revisit that code, all hell could break loose.
Random encounters are a big part of any classic RPG. You take a step forward, nothing happens. Take another step, still nothing happens. By your sixth step however, watch out, there are enemies ready to pounce at you. That’s what I’ve been working on this week – So I came up with a system using ScriptableObjects to spawn in enemies with a specific chance to spawn them. This means I’ve got rare encounters, as well as a list that’s on every level for what enemies spawn there.
The Skill System, a really important part of any game. A good skill system means you’ll be able to manage your skills, or have an array of abilities that’ll make even the brightest of wizards blush. One of the features of my upcoming game is that changing your gear will change the abilities you have access to. For instance, you can equip a sword for a specific skill – Which may be more useful against some bosses than others. This follows on nicely from last weeks’ post.
40 items have now been made and implemented in full. The revelation of using ScriptableObjects has actually made the process much faster for me. In fact, the game has chugged along quite happily since. But one thing I hadn’t done – I hadn’t created the full item list at this point. Now I have created 40 items. These 40 items do not include the games equipment, but I’m hopeful I can blast through equipment before next weeks post. Today however is a quick look at the items I’ve implemented.
Since starting development of this little Adventure/RPG, I’ve had to take full advantage of the ScriptableObjects data container. Last week I spoke briefly about implementing my inventory system, but to pull that together, I had to create some way to create items quickly. Naturally, I’ve been following guides, specifically ones from a YouTuber called Brackeys, who I would highly recommend checking out, if Unity is of interest to you. But this is a quick brief discussion about the ScriptableObjects data container as well as why you’d use it.
What fascinates me about RPGs and Adventure Games in general are the items. Sometimes an item is required to get past a specific point; in others, all items are convenience features. Whatever you use an item for, I’ve had to wrap my head around how to contain items within my game and most importantly – What a proper inventory system should look like. What I didn’t anticipate was how many different C# scripts would be required to interact properly with this inventory.
Making games is a long, arduous process. I want to show you more of what’s been worked on, but alas, my brain’s very scattered. This week I’ve made bits of audio for the game, some assets including character animations and a chunk of code. So instead, this week, I thought I’d chat about all the software I use and a quick screenshot of each.