Dmitry Kachkov – the current head of Sobaka Studio, was born in Baltiysk, Russia. He graduated with a degree in IT and worked on various games like SmashCars, HamsterBall for PS3, and Frontline Commando. He worked for video game companies that include Creat Studio, Sperasoft, and Glu Mobile. In 2016, he founded Sobaka Studio. The developer’s first title was beat ‘em up shooter Redeemer. Following the success of their first title, Dimitry Kachkov and his team released the Kung fu film style beat ‘em up 9 Monkeys of Shaolin in fall 2020.
Hi everyone. I’m Dmitry Kachkov, the founder of Sobaka Studio. Our small team has been developing beat’em up indie games for more than five years. Gameplay in this genre is often intertwined with its combat system. Many of you have probably noticed that the interesting, varied, and swift combat is often what captivates players over plot or environment within iconic beat’em up games.
This also applies to our games Redeemer and, more recently, 9 Monkeys of Shaolin. Critics praised both of our games for their excellent combat system. I define this style of combat system as “juicy” and will try to define what it means and how we achieve it in our games.
In Redeemer, our tough monk Vasiliy often has to throw enemies with his hands as far as possible, and in 9 Monkeys of Shaolin, the main character fights with a staff against numerous opponents and has to advance his fighting abilities within the game’s skill-development system.
This feeling of saturation and combat “juiciness” in both games is achieved with internally developed combo-attacks. So let’s dive into how we achieved that using Unreal Engine.
Combo-attack component configuration
Initially, the “combo-attack'' component is a playback of an attack/hit animation, but as the playback animation starts, there are still many additional conditions, events, and triggers to follow. These are the exact ingredients we’ll need to achieve that combat juiciness. We have been developing this aspect for a long period, and now it has grown into a big system, and it depends on a huge amount of additional settings. For now, by adjusting just one or two options, we can transform a “generic” animation playback into a compound sequence of actions.
Before I start to talk about internal functions, let's have a look at how to set up each combo-attack in UObject subclasses.
Example of the combo-attack adjusting
The settings used to make the combo attack can be divided into several categories:
Animation: Character and weapon animations.
Design: These are gameplay settings like damage, critical hit chance, bleeding damage, chance to block the attack, and so on. We also keep a list of attack stat modifiers the player gets while progressing.
Attack: The settings linked to the attack sequence and animation; an effective casualty radius, name of the bone that is responsible for hit tracing, distance to the enemy (how close should the character be to start an attack, etc.). Adjusting these settings is up to the animator.
Charged hit: This is for powerful-hit settings (like when the player holds a hit button for a few seconds to perform an attack). For instance, this determines what special effect to play while charging and what hit to use if this hit is charged.
Combo: The attacks that can continue the current combo if the player keeps pressing buttons while the attack animation is playing.
Hit: These settings define the amount of damage the enemy gets if the attack is successful and what hit animation will be played. In other words, here are stored particle settings for effects such as smoke, fire, and more, as well as audio files, enemy blinks, camera shakes, freezing, and a link on a Blueprint describing enemy reaction after taking a hit (animation for downtime). In our case, it’s a period of time during which an enemy lays on the ground, and so on.
We make extensive use of Animation Notifications, which we’ll simply refer to as notifications from this point onwards, to adjust and balance the gameplay, as well as for visual and sound changes. For starters, let’s have a look at basic gameplay notifications. With that, both the game designer and animator can carve every single detail of splendid gameplay.
While attacking, the player can dash to an opponent. This presents us with three stages: the starting animation, the movement towards an enemy, and the strike. If the enemy is near the player, the moving stage is very short or absent (for example, the player hits the button and the character strikes the enemy). If the enemy is a bit too far away for that sequence, then we play the starting animation, pause the animation, move the player to the enemy, unpause the animation, and then play the strike. To unpause and unpause animations, we use notifications, which frees up our animator from having to manually account for the distance players are from enemies.
Taking that into account, we set notifications precisely at the point where the animation should be paused, which is required to give the player a chance to dash first to reach the enemy. Points for those notifications are calculated so that the character does not hang for a long time. Nevertheless, players will have to hang for a bit for the sake of effectiveness. Dash is realized in the component by basic multiplication of the player’s maximum speed and force push to the direction of the dash-destination point (for example, to the auto-aimed target).
At some point in the attack animation, an AOEAttackState state turns on. AOE stands for area of effect. This state activates calculation of the hit ray tracing approximately inside the weapon-hit zone (sometimes greatly oversized) to determine if an enemy is hit.
Not only does AOEAttackState register hits on enemies, but it’s also a special separate StrikeHit animation notification. When the notification is activated, the enemy that is in front of the player's character within a certain radius is forcibly inflicted damage. All hit settings (such as tracings in AOE state and hit zones during the activity of strikeHit) are stored in a Blueprint of the current combo-attack. It’s where designers can fine-tune hits of different strikes.
The switch to the next attack notification
During the hit animation, a ShortTick animation notification (instant hit) can be displayed. When the ShortTick notification is triggered, the system checks if the attack button is being pressed at the beginning of the current attack. If so, this attack is to be followed by the next one, which is also configured in the combo-attack Blueprint. In other words, the attack’s Blueprint contains links to the Blueprints of other attacks that are triggered only if one of the hit buttons was pressed at the moment of ShortTick activation. Please note that ShortTick can be set multiple times to fine-tune the combo timings.
Cancel notifications finish the attack animation setup. This group of the notifications sets places in which it’s possible to cancel the animation in case a new event arises. Such events can be triggered if the player presses the move button or receives damage. For example, if a super hit is active, the weak enemies can’t interrupt it with their attacks. But as soon as the active phase finishes and the beautiful animation of the character’s model is ending, at this moment, the inflicted damage would interrupt the attack's animation and start the hit animation instead.
Charge attack notification
Most of the combat techniques in our game have “charged” versions (such as when an attack button is pressed and held, and the character makes an enhanced attack and deals more damage.) Although hits in the game are fast and should be performed rather quickly, the attack button can be held for a longer duration to perform a “charged“ attack. Therefore, in order to not leave the player in a passive charging state, we made a curve of the animation speed slowdown, which activates if the player is holding an attack button. In that case, the speed of animation slows down, and when the required amount of charge is accumulated, a special visual effect appears, and the hit deals double damage.
This image shows off our SFX and VFX notifications.
Besides the aforementioned gameplay notifications, we also have notifications responsible for the sound and visual components of the attack. They complete the picture.
Just an attack alone contains a series of sound effects, for instance: a weapon stroke, player steps, attack scream, the sound of a player landing after the attack, and many others. Every single character in our game has the same humanoid skeleton, and thus many characters can have the same attack animation. However, the different set of sounds and effects can dramatically change the perception of an attack.
If a hit on an enemy is detected, then there has to be a reaction to give the player some feedback. Generally speaking, the stronger feedback, the better. But at the same time, the reaction has to be manageable for designers.
Each combo-attack contains a Blueprint describing the reactions on a hit.
In the screenshot below, you can see that the enemies are separated into three types: light, medium, and heavy. Therefore, we are able to set a different reaction on the same hit used by different enemies.
This was not an instant solution. At first, we tried to set up the connection between a hit and reaction on that hit in the Blueprint of each enemy, but in that case, we were forced to enumerate all classes of attacks, of which there can be hundreds. This takes a long time and can lead to errors.
Then we tried to set classes of enemies in the hit reaction, but this presented an opposite problem: you need to enumerate many enemies in each hit reaction and, at the same time, must not forget to add them as you create new classes.
To simplify the process of creating such links, we separated enemies into four types: light, medium, heavy, and special. The special enemies process hits with special methods, and common enemies select an animation and its settings based on their type. Regarding that, reaction animations can not only be different by duration but also by the blocking of enemy moves and the counter of their attacks. For instance, a heavy enemy can play a hit animation, but, at any time, can interrupt this animation if he decides to attack. Scroll through the three GIFs in the gallery below.
Spectacularity and feedback
There are several auxiliary effects that can help make a more vivid impression on the player.
Camera shake. We can assign camera shaking for both hits against the enemy and against the player. In most cases, it will be a barely noticeable shake, but it can be stronger in moments that we deem to be really powerful hits against the player.
Particle effects. Different effects are important to us. Besides hit effects (staff attack, wind gust, and Qi energy), we've set up multiple effects for hitting enemies. In our case, it was worth assigning different hit types for the most important ones, such as when the enemy just took damage or when the enemy dies after a hit. We often deliberately exaggerate some settings in order to make the game look more spectacular.
Microfreezes. Besides particle effects and camera shaking, the micro-freezes are a very important part of our combat system. In fact, they are used in a huge number of the top slashes. A microfreeze is a short moment of time when the animation of the character and enemy stops. This grants each hit an additional weight. Of course, each hit has its own carefully calculated duration of this effect. When killing an enemy, the effect lasts longer than with a simple hit, and when killing the last enemy in a battle, it lasts even longer, as if we’re creating a full stop.
New features in 9 Monkeys of Shaolin
In order to highlight the design features of 9 Monkeys of Shaolin, we have applied several innovations to the combat system.
Weapon animation: Animator synchronizes weapon animations with the hit animation of the character.
Hit tracing that calculates weapon move trajectory: Often, the hits are very fast in our game and may last only a couple of frames; at the same time, a weapon can go further and even pass through the enemy. In order to prevent this behavior, we calculate a path made by the weapon and separate it into segments. Then, at each segment, we check whether the weapon intersects with the enemy.
Hit enhancements: the attack boosters: Since attacks contain many settings and some of them differ quite a lot from basic damage dealing, we have a way to improve these characteristics and pass the control over them to players. For example, we have a setting that’s responsible for the player’s auto-aiming and to calculate the distance between the player and enemy to perform an attack. If you increase its value, you can get very interesting results and can even heighten the feeling of combat.
Below is what a basic kick looks like.
And here is the improved kick.
The team’s work on the attacks, attack states, and the enemy typology, as well as the individual animation settings, brings us the juicy combat we tried to develop. I hope our experience here will be useful to you and your games. Thank you for taking the time to read our post.
Get Unreal Engine today!
Get the world’s most open and advanced creation tool.
With every feature and full source code access included, Unreal Engine comes fully loaded out of the box.