[SOLVED] Fighting Game Hitbox Data suggestions

I’m currently working on a 2D fighting game, and I’m trying to decide how to manage all the content involved with sprites and hitboxes, and am looking for suggestions.

Here are some options I’ve considered for spritesheets:

  • Would you use one huge spritesheet for all animation frames (for one character)? That seems kinda heavy and impractical to me, seeing as lots of frames can be of castly different size.
  • Would you use one file per frame? Again, this seems a bit impractical to me as the amount of files will shoot up really fast.
  • Would you use one spritesheet per animation? This seems like a reasonable middle ground in terms of management, but I wonder if there are some drawbacks I haven’t thought of yet.

For the hitboxes:

  • If I’d done some simple 2D platformer, I probably would have hard coded the hitboxes, but that doesn’t seem reasonable with the hundreds/thousands of animation frames the game will have.
  • I haven’t tried Hitboxer by ExciteMike yet, but it seems like I’d have to create 1 xml file per frame, which, again, seems kinda heavy.
  • Should I use mask collision detection and have a second hidden texture that represents the hitboxes?

Any input would be appreciated,
Philippe

Use a texture packing tool such as Texture Packer, ShoeBox, etc. No reason to manage sprites any other way. Most programs let you define the output data so you could bake your hitboxes right into the atlas data.

Thanks for the suggestion, I didn’t know about texture packing software. However, I’m not sure I understand how I can use these programs to add hitbox data, beyond going into the output files and hardcoding that information by hand.

In the end, what I did was create a WPF program that imports the new spritesheets I get from Shoebox, and then allows me to scroll through each frame one by one and draw hitboxes and hurtboxes, and each frame is saved as an object I can directly use in my game.

1 Like