Pixel perfect collision detection can be done by logical AND'ing the sprite bit masks.MathU wrote:You would have to program in morphing collision zones for the legs, arms, and upper body, and the highly-animated sprites would probably have to be cut back.
Hitboxes: lazy/bad programming or best idea ever?
Re: Hitboxes: lazy/bad programming or best idea ever?
Re: Hitboxes: lazy/bad programming or best idea ever?
Huh, I wonder why it isn't used very often... If ever?
Of course, that's just an opinion.
Always seeking netplay fans to play emulated arcade games with.
Always seeking netplay fans to play emulated arcade games with.
Re: Hitboxes: lazy/bad programming or best idea ever?
The thread subject line did not prepare me for a bunch of people defending their love of extremely-small hit boxes. I'm not a fan of them, because I like the video part of the video game to be representative of the game part. But comparing pixel-perfect collision detection to hit boxes in general, I guess there is always going to be a slight amount of ambiguity either way. Pixels that are part of a flame, smoke, shadow, glow, etc. might not be expected to count as a hit although they could be masking the actual boundary of an object. (BTW, have I ever mentioned that alpha effects should be banned in shmups? (except maybe in the background))
-
Squire Grooktook
- Posts: 5997
- Joined: Sat Jan 12, 2013 2:39 am
Re: Hitboxes: lazy/bad programming or best idea ever?
You've got it wrong man. It's not that we're defending that we love them, but we're defending them as valid game design. Not everyone has to love bullet hell or small hitboxes, but it's subjective, and saying it's outright objectively bad or lazy game design is just wrong.ED-057 wrote:The thread subject line did not prepare me for a bunch of people defending their love of extremely-small hit boxes.
Like I said, I still haven't seen one valid argument for a better way of replicating the bullet hell experience, or why it could be considered bad game design. The closest that we've come is the OP saying that you could achieve the same effect by making bullet patterns less dense...but that would just be Raiden, not Dodonpachi. The unique play style and feel would be lost forever.
Aeon Zenith - My STG.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.
Re: Hitboxes: lazy/bad programming or best idea ever?
Viewpoint is the one and only game where everything looks like their hitboxes. BRILLIANT!
(sorry, I had to
)
also lol realistic hitboxes
I wonder, though, if there would be any advantage of building "hitboxes" out of small bubbles and doing radius checks against everything. Isn't the way most older games check for hitboxes based on whether x and y coordinates meet a certain value (i.e. if the x coordinate isn't close enough, you don't have to check y; otherwise, check y, and then if it's a match a hit is registered)?
(sorry, I had to

also lol realistic hitboxes
I wonder, though, if there would be any advantage of building "hitboxes" out of small bubbles and doing radius checks against everything. Isn't the way most older games check for hitboxes based on whether x and y coordinates meet a certain value (i.e. if the x coordinate isn't close enough, you don't have to check y; otherwise, check y, and then if it's a match a hit is registered)?
Re: Hitboxes: lazy/bad programming or best idea ever?
Such methods are used when using a blitter or the CPU to draw the sprites in cases where pixel perfect collision detection is needed. When using hardware sprites, the hardware may have collision features, such as sprite-to-sprite and sprite-to-background.MathU wrote:Huh, I wonder why it isn't used very often... If ever?
Re: Hitboxes: lazy/bad programming or best idea ever?
Do you mean translucent things like beams? Because it's taken me a long time to figure out exactly what irks me about certain effects I see from time to time in recent 2D shooters and certain PC ones like Kamui and Satazius, but that's exactly it. I have no idea why either. Maybe it just looks bad.ED-057 wrote:(BTW, have I ever mentioned that alpha effects should be banned in shmups? (except maybe in the background))
Of course, that's just an opinion.
Always seeking netplay fans to play emulated arcade games with.
Always seeking netplay fans to play emulated arcade games with.
-
null1024
- Posts: 3823
- Joined: Sat Dec 15, 2007 8:52 pm
- Location: ʍoquıɐɹ ǝɥʇ ɹǝʌo 'ǝɹǝɥʍǝɯos
- Contact:
Re: Hitboxes: lazy/bad programming or best idea ever?
It's a bit hardware dependent on older systems [as in, either the hardware did sprite collision checking or it didn't], because often doing that in software against a bunch of objects isn't nearly as fast as doing ordinary rect-rect collisions. Even older shmups like R-Type cheat [I remember reading that the ship's hitbox is 1px, but the hitbox for each object is adjusted far out enough to account for the size of the whole ship, so it does faster point-rect collisions].MathU wrote:Huh, I wonder why it isn't used very often... If ever?
Hitboxes are a good speed-focused solution, and you just about can't have bullet hell without having a crazy tiny ship [it'd be something silly like 5x5] if the whole ship was the hitbox. You still need to be able to see where you are, having a larger ship sprite around that is a good way to do so. It also allows the artists to just not give a fuck about drawing a ship where the player runs the risk of getting hit in a spindly appendage and dying, even though that would an unreasonable result from pixel-perfect collision.
Maybe OP just wanted a large, almost ship-sized hitbox.
As used as a programming technique, it's fast [if there's lots of stuff on the screen, you're still doing more intensive collision tests constantly if you don't have hardware support for pixel collisions, unless you use a hybrid system, where only if something comes within your bounding box do you do then do a check for pixel perfect collision]. It's dead simple to implement [this is a big draw]. Hell, even fighting games use hitboxes because of the fact that it's much simpler to draw hit, hurt, and push boxes rather than make bitmasks for each.
It's one of those abstractions that really helps out and generally has resulted in good design. Realism can go suck a dick over good design [lest you develop a euroshmup], and hitboxes have way more advantages than disadvantages.
It's dirt simple to implement, you just give the ship some invincibility frames after getting hit instead of having to do a destroy animation and then put the ship back on screen. I've done it when I was lazy in what few shmups I've made.Kollision wrote:Good topic, to which I can only add an instant winner: Chaos Field.
In Chaos Field your ship isn't destroyed when you "lose a life", instead you see a brief collision animation and the ship keeps going (until you die your last life and the ship explodes for good - GAME OVER!)
I always thought it was the perfect way to implement the life concept in a shmup, so if I ever develop one that's what I'll do.
I've been surprised I haven't seen it elsewhere either.
IIRC, it's actually pretty fast to do circle-circle collision, although it does involve a few multiplies, which is expensive on older hardware. And it's only one compare!Ed Oscuro wrote: I wonder, though, if there would be any advantage of building "hitboxes" out of small bubbles and doing radius checks against everything. Isn't the way most older games check for hitboxes based on whether x and y coordinates meet a certain value (i.e. if the x coordinate isn't close enough, you don't have to check y; otherwise, check y, and then if it's a match a hit is registered)?
http://stackoverflow.com/questions/1736 ... -collision
I just think most devs though of rect-rect collision first. The radius check thing you mentioned is similar to my example of how I read R-Type does it's collisions, except it still uses boxes.
And for speed, it would probably be arranged based on screen orientation [so it'd be more likely that you'd only do 1 check than 2].
Come check out my website, I guess. Random stuff I've worked on over the last two decades.
Re: Hitboxes: lazy/bad programming or best idea ever?
Would it? I mean, would it *really*? I'm not sure that I can get on that train with you, man. A lot of what makes manic/bullet hell shooters what they are is speed of action and massive bullet patterns. Undoubtedly, the speed of action could be replicated without much trouble. I'll spot that making the entire player's ship (or at least the vast majority of it, which I obviously prefer) the hitbox can change the perspective of things...but speed of action and massive patterns could still be there. They just might be more in perspective with relation to the size of the player's ship. Yes, that means that the bullets might not be as plentiful, but that hardly means that there wouldn't be plenty, anyway.Squire Grooktook wrote:Like I said, I still haven't seen one valid argument for a better way of replicating the bullet hell experience, or why it could be considered bad game design. The closest that we've come is the OP saying that you could achieve the same effect by making bullet patterns less dense...but that would just be Raiden, not Dodonpachi. The unique play style and feel would be lost forever.
I'm still having trouble bridging that gap, there.
Re: Hitboxes: lazy/bad programming or best idea ever?
Oh, hey...that's fine! It's all good. If you can't laugh at yourself, you're probably pretty screwed anyway, so what's the point of not doing so?Ed Oscuro wrote:Viewpoint is the one and only game where everything looks like their hitboxes. BRILLIANT!
(sorry, I had to)
also lol realistic hitboxes
I wonder, though, if there would be any advantage of building "hitboxes" out of small bubbles and doing radius checks against everything. Isn't the way most older games check for hitboxes based on whether x and y coordinates meet a certain value (i.e. if the x coordinate isn't close enough, you don't have to check y; otherwise, check y, and then if it's a match a hit is registered)?
Of course, now I hate you forever since you took the name of my favorite game in vain.

-
BareKnuckleRoo
- Posts: 6693
- Joined: Mon Oct 03, 2011 4:01 am
- Location: Southern Ontario
Re: Hitboxes: lazy/bad programming or best idea ever?
This was already adequately addressed:boagman wrote:They just might be more in perspective with relation to the size of the player's ship. Yes, that means that the bullets might not be as plentiful, but that hardly means that there wouldn't be plenty, anyway.
You can't have it both ways. Screens are not infinite in size, and so you can't necessarily fit manic but fair dense patterns in with an enormous ship hitbox, and a tiny ship that's barely visible onscreen would be irritating for reasons I've already gone over. If you had dense patterns but your hitbox was the size of a whale, it wouldn't be Mushi Futari/DaiFukkatsu any more, as others have stated it'd feel like a totally different playstyle (probably a shitty euroshmup lol).Formless God wrote:Bigger hitboxes = less space for everything.
-
Squire Grooktook
- Posts: 5997
- Joined: Sat Jan 12, 2013 2:39 am
Re: Hitboxes: lazy/bad programming or best idea ever?
Yes.boagman wrote: Would it? I mean, would it *really*?
Like I said, you could never replicate the same kind of patterns and the sheer amount of information for the player to process on screen.boagman wrote: Would it? I mean, would it *really*? I'm not sure that I can get on that train with you, man. A lot of what makes manic/bullet hell shooters what they are is speed of action and massive bullet patterns. Undoubtedly, the speed of action could be replicated without much trouble. I'll spot that making the entire player's ship (or at least the vast majority of it, which I obviously prefer) the hitbox can change the perspective of things...but speed of action and massive patterns could still be there. They just might be more in perspective with relation to the size of the player's ship. Yes, that means that the bullets might not be as plentiful, but that hardly means that there wouldn't be plenty, anyway.
Picture a screen shot of a bullet hell shooter

Now, what your essentially proposing is that we essentially "zoom in" on the immediate area around the players sprite, while trimming down all the sprites to their true hitbox size. Now we have a bigger hitbox (since we zoomed in) and less dense bullet patterns (since we zoomed in, as well as cut back their sprites a bit). Now, what about all the information on 90% of the screen that we just cropped out. Do you see what I mean in saying that the it would be a different experience?
Part of the fun of bullet hell, for me at least, is the amount of skill it takes in processing and handling so much information on screen. Dodonpachi with a big ass hitbox and less dense and complex bullet patterns wouldn't be Dodonpachi. At all. Period.
I love me some Rayforce and Gradius far more then any Cave game, but I can't claim that the dodging in those games can hope to match the sheer complexity and depth of moment to moment dodging in a "danmaku" (as much as I hate that word...) game.
I think you just need to play more Dodonpachi :)boagman wrote: I'm still having trouble bridging that gap, there.
Aeon Zenith - My STG.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.
-
BareKnuckleRoo
- Posts: 6693
- Joined: Mon Oct 03, 2011 4:01 am
- Location: Southern Ontario
Re: Hitboxes: lazy/bad programming or best idea ever?
This.Squire Grooktook wrote:I think you just need to play more Dodonpachiboagman wrote: I'm still having trouble bridging that gap, there.
The size of bullet patterns isn't always as important as their density is, a lot of manic games are characterized by shots with tiny gaps to navigate. Instead of a massive hitbox with only a few safe spaces to navigate shots, you have a very small hitbox and thus more screen real-estate to make use of when dodging, but the patterns can be such that they're dense enough to still pose difficulty (in conjunction with speed, etc). A huge pattern means nothing if you can simply make a wide dodge around it, and so density is a huge factor in what makes bullet hell games so much fun.A lot of what makes manic/bullet hell shooters what they are is speed of action and massive bullet patterns.
This is all the sort of stuff I think you'd understand more if you actually had more experience with the genre.
-
Squire Grooktook
- Posts: 5997
- Joined: Sat Jan 12, 2013 2:39 am
Re: Hitboxes: lazy/bad programming or best idea ever?
By the way, I added that smiley 'cause I just want to make clear that I'm not trying to be elitist or look down on you for your questions. There's plenty I'm still learning about the design of these games too, I'm just trying to express what I think is great about the various genres.
Aeon Zenith - My STG.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.
Re: Hitboxes: lazy/bad programming or best idea ever?
I wasn't taking it that way. It's a discussion. I started it, and I'm reading the entire thread, and I enjoy keeping it relatively light as well. It keeps things in perspective, as well. There's that word again.Squire Grooktook wrote:By the way, I added that smiley 'cause I just want to make clear that I'm not trying to be elitist or look down on you for your questions. There's plenty I'm still learning about the design of these games too, I'm just trying to express what I think is great about the various genres.

I'll have to admit that I don't really completely understand your argument. Maybe that's my fault, as I'm just not understanding your logic, or at least the part that doesn't allow for the larger hitbox. I can't quite grasp the idea of the speed of action not being able to compensate for the lack of onscreen ridiculousness (for lack of a better term, but we all know that I could have come up with a far better term in the time it took me to type in this parenthetical statement). I think speed means more than you're giving it credit for.
-
Squire Grooktook
- Posts: 5997
- Joined: Sat Jan 12, 2013 2:39 am
Re: Hitboxes: lazy/bad programming or best idea ever?
BareKnuckleRoo was the one talking about speed.
I'm more saying that you can't FIT that much complexity on screen without the player running out of space. Bullet Hell patterns are nothing if not complex. Look at any traditional shooter, and even the more complex patterns will be nothing compared to a medium level bullet hell pattern.
I'm more saying that you can't FIT that much complexity on screen without the player running out of space. Bullet Hell patterns are nothing if not complex. Look at any traditional shooter, and even the more complex patterns will be nothing compared to a medium level bullet hell pattern.
Aeon Zenith - My STG.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.
Re: Hitboxes: lazy/bad programming or best idea ever?
And I'm not sure that you're right on that. I have a hard time believing that you'd classify Ikaruga as a bullet hell/manic shooter, right? I don't consider it to be one. I'm just as annoyed by the hitbox on that game as any other...and I think Ikaruga is a fantastic game!BareknuckleRoo wrote:This is all the sort of stuff I think you'd understand more if you actually had more experience with the genre.
Far be it from me to say that I'm a super-well-versed player in manic shmups, but this goes beyond that, anyway.
Re: Hitboxes: lazy/bad programming or best idea ever?
Simple way to resolve this is to go play MD Truxton and Zed Blade for an afternoon and you'll embrace the beauty of the hitbox forever more.
Always outnumbered, never outgunned - No zuo no die
ChurchOfSolipsism wrote: ALso, this is how SKykid usually posts
Re: Hitboxes: lazy/bad programming or best idea ever?
See, you say that, but my memory of playing Zed Blade was fantasticness. Don't know that I've ever played the MD version of Truxton. I assume that you're referring to the Neo-Geo version of Zed Blade, yes? If so, yes: I really liked that.Skykid wrote:Simple way to resolve this is to go play MD Truxton and Zed Blade for an afternoon and you'll embrace the beauty of the hitbox forever more.
Re: Hitboxes: lazy/bad programming or best idea ever?
Zed Blade is absolutely amazing, but the hitbox is bigger than the ship (at least that was our running joke while it was installed in the arcade.
)

Always outnumbered, never outgunned - No zuo no die
ChurchOfSolipsism wrote: ALso, this is how SKykid usually posts
Re: Hitboxes: lazy/bad programming or best idea ever?
If you want a really good example, try that horrendous port of R-Type III for the GBA. Aside from all the other extreme inaccuracies (the developers most likely didn't have the source code), the hitbox is changed from a sliver in the middle of the R-90 to literally the entire ship and the game is very frustrating because of it--and this is in spite of the reduced play area the game features!
Of course, that's just an opinion.
Always seeking netplay fans to play emulated arcade games with.
Always seeking netplay fans to play emulated arcade games with.
Re: Hitboxes: lazy/bad programming or best idea ever?
Interesting. Haven't played that at all. Sounds lousy, but then, shmups on tiny screens kind of are in general.MathU wrote:If you want a really good example, try that horrendous port of R-Type III for the GBA. Aside from all the other extreme inaccuracies (the developers most likely didn't have the source code), the hitbox is changed from a sliver in the middle of the R-90 to literally the entire ship and the game is very frustrating because of it--and this is in spite of the reduced play area the game features!
Re: Hitboxes: lazy/bad programming or best idea ever?
Per-pixel collision sounds bad unless your ship design is finalized before you start making the game, otherwise you are rebalancing the entire game whenever the artist makes a modification.
I always wondered what the reception would be for a game where your hitbox changes in a big way during gameplay, like an evil object enters the screen and your visible hitbox gets huge until you destroy it.
Probably pure rage, at first anyway.
The only games I know of that have this type of mechanic are Gradius (3?) where a shield makes your hitbox bigger, which is kind of rank-like, and Psyvariar where you can do a barrel roll to make your hitbox a lot smaller.
I always wondered what the reception would be for a game where your hitbox changes in a big way during gameplay, like an evil object enters the screen and your visible hitbox gets huge until you destroy it.
Probably pure rage, at first anyway.
The only games I know of that have this type of mechanic are Gradius (3?) where a shield makes your hitbox bigger, which is kind of rank-like, and Psyvariar where you can do a barrel roll to make your hitbox a lot smaller.
Re: Hitboxes: lazy/bad programming or best idea ever?
Your hitbox gets significantly bigger in Darius Gaiden with a shield as well. It's probably the same in other Darius games but I haven't tested them.
Of course, that's just an opinion.
Always seeking netplay fans to play emulated arcade games with.
Always seeking netplay fans to play emulated arcade games with.
-
Squire Grooktook
- Posts: 5997
- Joined: Sat Jan 12, 2013 2:39 am
Re: Hitboxes: lazy/bad programming or best idea ever?
The force fields in all Gradius games have a bigger hitbox, but this never results in death. Every time you get hit, a layer of the hitbox is stripped off until it's returned to its original naked form.
Gradius III Snes actually has a power up that reduces your hitbox and sprite size. Needless to say, it's kinda OP.
Gradius III Snes actually has a power up that reduces your hitbox and sprite size. Needless to say, it's kinda OP.
Aeon Zenith - My STG.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.
Re: Hitboxes: lazy/bad programming or best idea ever?
So it's out there but there's always a safety net with the shield, I like to imagine the scrambling when there isn't any safety net and the hitbox is just massively bigger.
It might even make it so you can't fit through some tight spots in the terrain anymore, if it's that type of game, did that ever happen in Gradius?
It might even make it so you can't fit through some tight spots in the terrain anymore, if it's that type of game, did that ever happen in Gradius?
-
Squire Grooktook
- Posts: 5997
- Joined: Sat Jan 12, 2013 2:39 am
Re: Hitboxes: lazy/bad programming or best idea ever?
It did, but like I said it doesn't kill you.
For example, there's a tight space in the speed up section of Gradius II Arc which is too big for your shield. All it does is scrape off your shield and leave you at a naked, normal sized hitbox.
For example, there's a tight space in the speed up section of Gradius II Arc which is too big for your shield. All it does is scrape off your shield and leave you at a naked, normal sized hitbox.
Aeon Zenith - My STG.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.
Re: Hitboxes: lazy/bad programming or best idea ever?
Jumping in to say pixel-perfect collision detection is still only fine enough to collide pixels, which despite how nice it sounds, is pretty awful. All collisions at that point become essentially dependent on rendering; you get some problems of processing game logic vs rendering, and more importantly you lose the ability to accurately perform collision detection for anything beyond Galaga. Every moving object would have to move at pixel-unit speeds in order for detection to be accurate, which for a shmup, is basically sabotaging yourself. The game logic's accuracy is more important than your rendering. If a bullet moves in a circle through some trigonometric function, its actual position is likely not going to be on a pixel. Really, most objects in the game will not have a pixel-perfect position at most given moments. The rendering is only a best-approximation of that, and is generally all that's needed.
edit: to answer op, "what no why is this even a question"
edit: to answer op, "what no why is this even a question"

Re: Hitboxes: lazy/bad programming or best idea ever?
Because it seems that it's not exactly a set-in-stone science, doesn't it?Drake wrote: to answer op, "what no why is this even a question"
-
KidQuaalude
- Posts: 140
- Joined: Tue Aug 25, 2009 9:59 am
- Location: UK
Re: Hitboxes: lazy/bad programming or best idea ever?
Hitboxes are easy as hell to program, regardless of the method used. The reason small hitboxes have become the norm is because of the density of the bullet patterns later in most of these games. A ship with a "full-body" hitbox could not navigate these at all. If you don't realise this, you probably havent been far enough into the games to see the really dense patterns yet.