A kind of magic – How to create Skills for video games


Hi dear reader, my name is Chris, lead programmer for Chonky – From Breakfast to Domination.
Today I want to tell you a bit about how we at Enhydra Games create the magical abilities used by our beloved Chonkys.

The components

To start things of, here is a short list of all the tecnical components we need to build our abilities:

  • Damage system
  • Visuals
  • Special “effects”
  • Unique logic
  • Controll/casting
  • Sound
  • Unlocking
  • Saving

Damage system

Easily the most important part despite often being overlooked. Most skills or magical abilities in Chonky are able to damage enemies. To detect if the skill met its target either the visual particle effect itself needs to detect overlaps or a hitbox needs to be attached to the visual parts of the skill. This hitbox changes in size depending on the size and shape of the skill and can disapear or even spawn additional ones (for example when something explodes).

This logic has to be created for all the different types of skills and handles all the work that applies damage or effects to target actors.

Visuals

The glamour, the glitter, the explosions. Probably the most self explanatory part of magic. Particle and VFX effects, in our case done in Niagara in Unreal Engine 5, comprise the majority of what you can see when casting magic in Chonky. Some of the skills also make use of 3D objects (like apples, baskets, or flowers) but almost everything is a particle effect.

From the fire to the swirls and the puffs of smoke, everything consists of particles

Special “effects”

Sooner or later you will stumble upon a skill that should do more (or less) than just simply apply damage in a specific way. For these skills, like buffing the player, debuffing enemies or whatnot, you will need additional effects.

Unique logic

What is the use in having a 100+ skills if all of them are just: “click somewhere and whatever is there gets dealt some damage”?
Players want to have unique skills, not only visually but also from the perspective of gameplay. And we have the honour the implement those.
To give an example, some skills might follow the player, others the mouse cursor, some might be shot in a certain direction while others need to find their target on their on. The list goes on and on.

Controll/Casting

It might seem that we have covered this topic in the point above, but actually we missed a vital part. How do you even cast a skill?
For Chonky we decided on giving the player a review of his maximum range for casting a skill when he presses the button down, while hiding that preview and casting the skill when he releases that button.

Our meteor skill being used

Sound

No good meteor hiting something when it sounds like a pebble falling on the ground. Skills need good sounds and the need lots of them. Sound while you are casting, sound for traveling through the air, sound for hiting something, sound for disipating and so on.

Unlocking

While in most games this is done via a dedicated skill tree, Chonky does not have that luxury. At least not all of it.
For our game, where skills are hidden and the unlock requirements can be pretty complex, those requirements are mainly managed within the skills themselfs. There is a dedicated tracking system providing all the necessary information, but that is a rabid hole for another day.
For now just a reminder that if you ever should be in a situation where you need to create skills for a video game, remember that they have to be acquired somehow.

Saving

And also remember that they need to be remembered somehow. Jokes beside, unlocked skills need to be saved somewhere, but this should not be done within the skills themselfes. For Chonky there is the diary that handles these things, for most other games this can be done within the skill tree itself.

Summary

  • The visuals are not the only important part of our skills. A lot of programming logic is required to make everything work like intended
  • Different skills should handle differently, therefore it is a good thing to group them into fitting skill types
  • Skills without sound are not satisfying. Sound Effects help to build convincing magic
, ,