Question about hitbox design

This is the main shmups forum. Chat about shmups in here - keep it on-topic please!
Post Reply
User avatar
Squire Grooktook
Posts: 5997
Joined: Sat Jan 12, 2013 2:39 am

Question about hitbox design

Post by Squire Grooktook »

For non obvious bullet hell type things, and games that have maybe slightly larger hitboxes, what is the common practice of designers of when to decide the size of a players hitbox? Do they decide the hitbox size before anything else, and then start thinking up and designing bullet patterns and whatnot? Or do they start thinking of the types of bullet patterns and stages that they want, and then gradually adjust the hitbox to deal with them?

I'm just wondering if hitbox size has ever been adjusted in mid development. Like maybe they had 2 or 3 stages up and running, and then someone said "you know, this might be more 'fair' if we trimmed a few pixels of the crafts hitbox".
RegalSin wrote:Japan an almost perfect society always threatened by outsiders....................

Instead I am stuck in the America's where women rule with an iron crotch, and a man could get arrested for sitting behind a computer too long.
Aeon Zenith - My STG.
User avatar
BareKnuckleRoo
Posts: 6693
Joined: Mon Oct 03, 2011 4:01 am
Location: Southern Ontario

Re: Question about hitbox design

Post by BareKnuckleRoo »

Squire Grooktook wrote:I'm just wondering if hitbox size has ever been adjusted in mid development. Like maybe they had 2 or 3 stages up and running, and then someone said "you know, this might be more 'fair' if we trimmed a few pixels of the crafts hitbox".
It's probably easiest to design the patterns around the hitbox, but hitbox size should be easy to tweak compared to messing with existing patterns, so I imagine that happens more. A number of Cave games have rereleases with tweaked hitbox size: Batsugun vs Batsugun Special, DDP DOJ WL vs BL (pretty sure it's a tad smaller), and obviously from the original Donpachi to the second game, DoDonPachi. I think the hitbox is the same size in Futari 1.5 Original vs BL Original, but I know for sure the hitbox is reduced at higher difficulties (much smaller in Ultra/God) so there's an example of hitbox tweaking in difficulty modes.
User avatar
Drake
Posts: 144
Joined: Sun Jan 30, 2011 10:21 pm

Re: Question about hitbox design

Post by Drake »

Hitbox size has probably been adjusted throughout development of a game, but usually it isn't to make it more "fair" but more "intuitive". You'd start with a general idea of how the patterns in the game will act and how the player will have to dodge, and you start with a baseline that makes sense with those parameters. Then you develop, and you test. You test and test and test and test, and you should be able to get a feel for what size hitbox seems to mesh well with the game's patterns and design. While I guess you could just make it smaller for "fairness", you shouldn't have to push yourself to make the game easier or harder by tweaking the hitbox size. That sort of mindset gives way to abuse in either direction and can lead to poor design choices, that usually result in an unnatural-feeling hitbox. I can't really speak for others, but I feel that the hitbox size should reflect how the player is going to naturally respond and play the game, rather than it being a question of using it to make the game easier/harder.
Image
User avatar
Squire Grooktook
Posts: 5997
Joined: Sat Jan 12, 2013 2:39 am

Re: Question about hitbox design

Post by Squire Grooktook »

Yes that all makes sense. Thank you for the responses.
RegalSin wrote:Japan an almost perfect society always threatened by outsiders....................

Instead I am stuck in the America's where women rule with an iron crotch, and a man could get arrested for sitting behind a computer too long.
Aeon Zenith - My STG.
mystran
Posts: 77
Joined: Tue Mar 12, 2013 11:59 pm
Location: Helsinki, FI

Re: Question about hitbox design

Post by mystran »

Here's something to think about (and yeah it's a bit advanced I suppose, but the idea itself is simple to use): when detecting collisions, the collision shapes (hitboxes) of the two objects considered can be added together using Minkowski addition (strictly speaking you need to "invert" one of the shapes, but it doesn't matter for symmetric shapes), and the resulting shape tested for collision against a point, which then yields the exact same results as the original two-shape collision test (it's great for swept 3D collisions, because it makes the math manageable, but it works for basic 2D checks too).

Since the wikipedia page I linked is a bit confusing, let's consider some examples: for two axis aligned rectangles, you would simply add together the widths and the heights, to get a larger rectangle. For two circles you would add their radiuses together to get a larger circle. For circle against a rectangle, you would get a shape that is a rectangle outlined with the circle.. sort of.. the important thing is that the two methods are mathematically equivalent: the hitbox of a player is simply meaningless, except in relation to other hitboxes (bullets, enemies, etc).

Now, what all this voodoo actually means is that you don't necessarily need to consider player hitbox at all! You simply need to consider where the center of that hitbox is, and test that point against the bullet hitboxes, which you adjust to compensate for the now "infinitely small" player hitbox by adding the old player hitbox by Minkowski addition (assuming you think it's worth it; in practice you can just make bullet hitboxes a bit larger in general). Obviously if you're working in an environment that doesn't allow "point vs. hitbox" collisions (are there such environments?) you need some minimal proxy shape, (such as 1px) but the point is: adjusting player hitbox is a rather annoying thing to do (and totally pointless), as you have to reconsider each and every pattern in the whole game. Adjusting the hitbox of a given bullet type is much easier, as you can even make that bullet type unique to the pattern you want to adjust. This reduces testing to checking that every pattern "feels right" and then adjusting those that don't.
Post Reply