Okay! The last time I updated this I had an animation for Jab1, but knew it would take some time to get it fully implemented. Well it’s not quite 100% done, but everything on the attacker’s side is complete. For example, here’s Jab1 with hitboxes in-game!
Wall sliding and the ledge bump fix are examples of problems where the difficulty was getting creative to find a solution. Once I had the right idea of how to fix them, the implementation was pretty fast and easy. Hitboxes were the opposite. I knew even before I started coding how I wanted to set them up, the problem was what kind of code I needed to write to get them working.
The idea for how hitboxes work in-game is pretty straight-forward. During certain frames of the attack, a series of collision spheres get summoned and then later destroyed. Each sphere is a hitbox, and the only thing it’s looking for is if it overlaps with another character’s hurtbox. If so, it tells that character they just got hit, and also what the hitbox data was that hit them (damage, knockback angle, base knockback, and scaling knockback). From there the other character can figure out on their own how they need to respond.
When summoned, each hitbox is tied to a bone on the character’s body. So all I need to know is what frames it’s active for and then the hitbox just follows the path of the animation automatically.
The second thing I got done since the last update were hurtboxes. I mentioned them earlier, but hurtboxes are what the game uses to check collision with hitboxes. Similar to how landing collision is checked using a single big capsule, hurtboxes are a bunch of small capsules. You can see the hurtboxes with and without the mesh here:
This ended up being a really long post, so I decided to split it into two parts. Looks like I got a lot done in the last week and a half! Onwards, to part 2!