Fighting game hitbox tutorial

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
handsome_pete
Prole
Posts: 2
Joined: Sat Nov 30, 2019 5:39 pm

Fighting game hitbox tutorial

Post by handsome_pete » Sat Nov 30, 2019 5:53 pm

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.

User avatar
Stifu
Citizen
Posts: 72
Joined: Mon Mar 14, 2016 9:53 am
Contact:

Re: Fighting game hitbox tutorial

Post by Stifu » Sun Dec 01, 2019 9:43 pm

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).
Zabuyaki, our upcoming beat 'em up: https://www.zabuyaki.com

handsome_pete
Prole
Posts: 2
Joined: Sat Nov 30, 2019 5:39 pm

Re: Fighting game hitbox tutorial

Post by handsome_pete » Mon Dec 02, 2019 4:15 pm

Awesome, thanks for the reply. That makes sense.

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

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests