Melee Skill System

Published on 2023-04-02
#gamedev #bit-dungeons

I've been working on the skill system for Bit Dungeons, and while it is only partially implemented, I thought I'd muse on some of the design choices.

Design Compromises & Goals

One of the core design tenets is simplicity in gameplay. This doesn't mean the game itself doesn't have depth in its mechanics, but that the actual act of playing is simple. This brings up a few design choices that will certainly need iteration.

Initially, I wanted the skill system to be as you would expect: you press a button and it uses the skill. One of the problems, however, is that melee combat works by "bumping" enemies - a player doesn't actually have an orientation in the world. This means that it's difficult to know which direction to use a skill in.

You could, of course, simply use it in the last direction the player moved. However, when I think about a situation where players may want to move back from an enemy, this could result in a skill being used on an empty tile accidently. It would also be difficult for a player to tell if they were facing up or down - as there is no visual indicator of orientation in those directions (at least, not yet).

It's not an insurmountable problem, but - at least for melee - the idea of "your next attack" came up. This is the system I implemented for melee skills as of right now, and i'm actually pretty happy with how it turned out.

Basically, all of these skills are just enhancements to your auto-attacks. This means that you don't have to worry about which direction you're facing, and you don't have to worry about accidentally using a skill when you don't want to. A huge upside was that it just worked with the current combat system, as I just had to add a check for queued skills when a player bumped an enemy.

Showing off a buff icon when using an ability with the floating combat text.Queued skills and floating text.

The way it currently works is that players gain a "buff" when they activate their skill. This adds it to a queue which is emptied whenever the conditions are met, eg. bumping an enemy to attack them. It feels pretty smooth to play, and gives full control to the player without requiring extra keypresses or thought, for the most part.

The "buffs" only last a short time, as they are meant to act like instant attacks. That said, they still offer just enough room where you can "pre-buff" before jumping into a fight.

Mass Prebuffing: GCD or Let it Be?

This does bring up the problem of promoting a gameplay style where you wait until all of your cooldowns are up, pre-buff with multiple skills, then run in and obliterate the target.

There's a few ways to tackle that - if it's even really a problem. My first thought is to add a GCD - global cooldown - so that every pre-buff skill incurs a short cooldown on all of your other abilities. This would limit the amount of pre-buffing you could do, as earlier skills would start falling off the queue.

Another option is just letting it be. Currently, the intent is that you can only have 4 of your hotbar slots filled with usable skills (the remaining two slots being for consumable items). Now, I definitely cannot say if this option will stay as is. I might introduce a second bar specifically for items - but still, 6 skills does limit you pretty heavily. I just don't want people to feel like they have to wait for all of their skills to be up before they can do anything.

I'll certainly have to revisit it in the future, when more skills are added. Until then, it's not a serious concern.

Considering Ranged Combat

The above solution works fine for melee, but there are many issues with ranged combat adopting a similar approach.

Now, I haven't fully fleshed out how magic or archery will work, but I have floated various ideas. One option is targeted skills, where you tab-target or click an enemy, then use a skill traditionally. I feel like this might be at odds with the above system, though - where melee could play similarly. That said, I think melee actually benefits from the "buff" style system. Roguelikes in general seem to use this kind of dual system, so it's likely the route I go.

Frankly, I'm more concerned with balancing ranged combat than anything else - but that's a post for another day.

Back Home