Rob - Blog Post #8 - Super Attacks + Cleaner Platforming

Super/Strong Attacks

One of my goals for improving the combat system is adding in Super Attacks, which are improvements of the base attacks. I already implemented a mechanic I just call Cancelling, which is when the player hits an enemy with the Smack attack. This puts the character into a very short, temporary state where they can input any attack (except Smack) and that attack will instantly start. In practice, this just makes combos nice and easy. 

In order to make Cancels rewarding, I initally made them have increased knockback and damage. This wasn't satisfying enough, nor was it obvious enough, so I went back to the drawing board and pulled from a previous idea we had discussed. We debated on whether or not our attacks would function differently in mid-air, since they had already been implemented on the ground. We considered the idea, but pushed it into the backlog. Drawing from this, I decided that the moves that can be combo'd into (Slap and Stab) would get 2 Super versions each: one when you're grounded, and one when you're in the air.

  Example of a Super (and then me whiffing an attack

Example of a Super (and then me whiffing an attack

Shared Characteristics of Super Attacks

All Super attacks will have the following traits:

  • Player Movement is locked. You give up control of the character during these moves, which makes them more purposeful and powerful.
  • Increased Damage and Knockback.
  • Player is Invincible for majority of the move.
  • Hitboxes are larger
  • Animation time is longer (~30%)

Additionally, for feedback systems, I've made the character sprite turn a bit yellow when they are in the "combo state" after hitting an enemy with Smack, and they turn blue when they're invincible during a Super.

  Smack hit an enemy - The player is Yellow until the effect wears off (or they input an attack, triggering a Super).

Smack hit an enemy - The player is Yellow until the effect wears off (or they input an attack, triggering a Super).

  The player used Slap (Super). The attack hit the enemy a few frames ago, and he's travelled quite a distance in that time.

The player used Slap (Super). The attack hit the enemy a few frames ago, and he's travelled quite a distance in that time.

Super Stab - First Pass

This week, I implemented the Aerial Super for Stab. I'm leaving the grounded one for next week, since implementing these takes quite some time. There's a lot of tweaking involved to make the moves feel unique enough that the player realizes they did something different.

For this Aerial Super Stab, I made it so the player launches forward during the attack. This is really cool because it's a good answer for two distinct situations: Aerial Combos, and Combo-ing Light enemies. If an enemy is flying, it's hard to get more than one hit on them because the knockback pushes them just out of range (unless you hit them when they were below you). With how this moves, you end up staying just about in-line with the enemy, so you can land that one extra hit before landing on the ground.

For enemies that take a lot of knockback (Light enemies), this also helps you chase them down in a similar fashion to flying enemies. The Fly enemy we have actually meets both of these criteria, as it flies overhead and takes a lot of knockback. Even with Cancels, it was impossible to combo them previously. With this move, however, we can now Smack the fly and immediately Stab in order to chase it down, and even if the stab misses, we can usually follow up with a Slap.

  Attack Order: Smack -> Stab (Super Aerial) -> Slap .  Does exactly 20 damage, killing Fly.

Attack Order: Smack -> Stab (Super Aerial) -> Slap. Does exactly 20 damage, killing Fly.

Super Slap (Overhead) - First Pass

Like the Stab attack, I've implemented only one of the two Super versions of Slap. In this case, I created the grounded version. The main change from Slap (other than the timing of the hit and animation) is that the knockback angle is lower. Instead of hitting enemies up at about a 45 degree angle, this move isn't meant to elongate combos, and will send all enemies it hits away from you. In other words, it's really great for clearing a group of enemies that might be swarming you, or for pushing one pesky enemy out of your way. The larger hitbox also covers the player really well, so it still serves its purpose as a way to deal with enemies above the player.

  Slap (Super). Whiffed a few times, but we got a good one in there.   Before lowering the knockback angle, the slime used to end up on the higher step to the right.

Slap (Super). Whiffed a few times, but we got a good one in there. Before lowering the knockback angle, the slime used to end up on the higher step to the right.

Jump Improvements

Instead of messing with jump metrics again, I worked on a new system to improve jumping overall. One issue the game has is that all of the colliders are box colliders. It's very hard to push a box onto another box if they are overlapping at all.

  The Player is moving left, but they cannot because they are just barely colliding with the Ground.

The Player is moving left, but they cannot because they are just barely colliding with the Ground.

Our player character would visually appear to vertically clear the ground (since the sprites aren't necessarily boxes), so this collision felt a bit off. All I did was add 3 checks during the peak of the jump in order to improve the player's chances of landing on the ground instead of falling back down.

Referencing the image above, the 3 checks are:

  1. The player is trying to move horizontally
  2. The yellow line is touching the ground, but the purple line is not
  3. The character's approaching the peak of their jump (based on timing + speed)

If all three of these checks are met and the player's vertical speed is in the right range, the player will be vertically lifted just enough to climb onto the platform. This is not very obvious in play (far less obvious than climbing a block by walking into it in Minecraft) and I think I'd like to keep it that way. It's something that should feel natural, because the issue it solved was unnatural.

  The first jump in this GIF used to be impossible to make, and was frustrating players.

The first jump in this GIF used to be impossible to make, and was frustrating players.