Page 1 of 1

Fighting game hitbox tutorial

Posted: Sat Nov 30, 2019 5:53 pm
by handsome_pete
Hello all. I'm pretty new to Lua/Love and I'm putting together a very simple proof of concept 2D fighter which I will hopefully develop and build out more as I get more comfortable. Basically, my immediate goal is to have 2 characters (same sprite, different color palettes) that can punch/kick and get hit. I'll move to more complex moves (jump kick, crouch kick, etc.) down the road.

I understand the basics of AABBs and was looking over the bump.lua documentation for implementation. I guess I'm mostly just trying to wrap my head around how I essentially attach my hit/hurt boxes to move along with my character and its animations. I've found a few threads searching the forums that helped a little, but if anyone who has worked on this type of game before has any advice or resources that could be of help, it would be appreciated.

Thanks.

Re: Fighting game hitbox tutorial

Posted: Sun Dec 01, 2019 9:43 pm
by Stifu
handsome_pete wrote:
Sat Nov 30, 2019 5:53 pm
I guess I'm mostly just trying to wrap my head around how I essentially attach my hit/hurt boxes to move along with my character and its animations.
The way I see it, you wouldn't have a box that moves along with your character, but the character would be the visual representation of your box. The difference is that you won't need to sync two objects, they'd be one and the same.

Friends and I are working on a beat 'em up (although I'm not the developer). Have a look at one of our character definitions, this might inspire you. This one has the same hurtbox for all frames (a default value that can be overriden), and hitboxes are defined in attack functions (like for the combo1 animation, for example).

Re: Fighting game hitbox tutorial

Posted: Mon Dec 02, 2019 4:15 pm
by handsome_pete
Awesome, thanks for the reply. That makes sense.

And thanks for the link, I'll check it out.