This question is with regards to a 2D fighting game.
Horizontal flip, in logic, works fine for character sprites which need to face the other directiron, i.e.:
However, a problem arises if the characters are not centered in the graphic. For example:
Horizontally flipping it results in this
Now the main problem is, the drawing functions use the top left part of the image to be the "start" point. So when the player changes facing/direction, he actually "moves" a lot in the horizontal plane.
For a fighting game which relies on the actual sprite graphics to determine hit boxes and collision, this is of course unacceptable.
I've tried searching for some guidance on this, but I do not exactly know what this issue is called and hence turn up with mostly unrelated results. I tried manually plowing through the old posts with not much success.
As far as I can see, I would need to offset the placement of the sprites. However, my sprites are extremely varied in shape and size, and I cringe at the thought of having to manually determine, then test where the "center" point of each frame is.
Another way which I have thought of, is to tell my artists to manually determine an anchor/reference point at the feet of the character, and to extend the size of the bitmap to as much width/height as is needed to keep it right at the center (down to one pixel accuracy). This seems logically correct, but would result in, I imagine, a lot of extra effort on the part of my artists which should not be theirs (hey, artists should just draw draw draw!). Secondly, it would increase the overall size of my graphic resources and indirectly, program memory.
Thus I pose this question to the community: how would you overcome this issue?
If I am missing something blatantly obvious, please point it out to me as I am new to game design and implementation in general.
Thanks for any input
P.S: That is not my sprite, I merely use it as an example.
EDIT: wow the pictures aligned weird, but they looked fine in the preview, fixed
PPS: Why did the draw_sprite_h_flip lose its underscores?