Discuss Scratch

Vortexia
Scratcher
2 posts

Hitboxes

Hi everyone!
I don't think the scratch team would see this but if this got added it would mean the absolute world to me.
I suggest that we get a hitbox feature
For those who don't know what a hitbox it, here is the definition: A hitbox is an invisible box-like area that when penetrated, counts as a “hit”. It's different than the model (the visible character and his colors that you see). The hitbox is meant to compensate for lag and movement. When a character is moving, his hitbox is usually farther from the model.

Basically, I am making a platformer game and the sprite I want to use is really big. Currently in scratch the hitbox for sprites is the shape of the sprites current costume. I suggest scratch team adds a way to edit the hitbox of a sprite, so for example, you could have a circle with the hitbox of a square, and if another sprite touches the square hitbox, it will count as touching the circle.

This would be a great improvement to scratch!
duckboycool
Scratcher
1000+ posts

Hitboxes

Wouldn't you want a hitbox to actually look like a sprite so it seems smoother?
Penguin9090_new
Scratcher
500+ posts

Hitboxes

This could be kind of complex.
I could see it as a new tab next to costumes, or within the costumes tab itself.
However, the use seems limited. What would you use this for? Couldn't you change the size of the sprite instead?
Support anyway, any feature that has a use that can't be worked around easily is good.
Sigton
Scratcher
1000+ posts

Hitboxes

duckboycool wrote:

Wouldn't you want a hitbox to actually look like a sprite so it seems smoother?
The hitbox would be invisible

This is workaroundable, there is a tutorial that covers this.

Sigton
Vortexia
Scratcher
2 posts

Hitboxes

Sigton wrote:

duckboycool wrote:

Wouldn't you want a hitbox to actually look like a sprite so it seems smoother?
The hitbox would be invisible

This is workaroundable, there is a tutorial that covers this.

Sigton

Thanks a lot! (hope that didn't sound sarcastic) this helps a ton
duckboycool
Scratcher
1000+ posts

Hitboxes

Sigton wrote:

duckboycool wrote:

Wouldn't you want a hitbox to actually look like a sprite so it seems smoother?
The hitbox would be invisible
No I mean that making your hitbox a box allows collision where there is none, or lack of collision where there is. I feel like a hitbox that actually looks like the sprite is a good thing.
WolfCat67
Scratcher
1000+ posts

Hitboxes

duckboycool wrote:

Sigton wrote:

duckboycool wrote:

Wouldn't you want a hitbox to actually look like a sprite so it seems smoother?
The hitbox would be invisible
No I mean that making your hitbox a box allows collision where there is none, or lack of collision where there is. I feel like a hitbox that actually looks like the sprite is a good thing.
In some platformers, though, it may not be that good. After all, it is quite annoying if one of your characters' limbs is causing your platforming script to malfunction as it's stuck on the side of a block. In some cases, the hitboxes are good with being a different shape.
However, to allow for hitboxes to be the way that @duckboycool mentioned, I think that you should be able to edit a hitbox the same way as you can edit a sprite; however, with only vector mode capability, and ONLY filled-in shapes instead of being able to colour it whatever you want.
Sigton
Scratcher
1000+ posts

Hitboxes

duckboycool wrote:

Sigton wrote:

duckboycool wrote:

Wouldn't you want a hitbox to actually look like a sprite so it seems smoother?
The hitbox would be invisible
No I mean that making your hitbox a box allows collision where there is none, or lack of collision where there is. I feel like a hitbox that actually looks like the sprite is a good thing.
But it's close enough so that it's not noticeable. A rectangle is a nice regular shape, where the sprite can have an interesting and strange shape. The rectangle is much easier when dealing with collisions. (I know my stuff when it comes to platformers btw)

Sigton
Greenduck54
Scratcher
500+ posts

Hitboxes

Sigton wrote:

duckboycool wrote:

Wouldn't you want a hitbox to actually look like a sprite so it seems smoother?
The hitbox would be invisible

This is workaroundable, there is a tutorial that covers this.

Sigton
idk, it causes a lot of lag on slow computers (because of constantly switching costumes)
Birdlegs
Scratcher
1000+ posts

Hitboxes

Greenduck54 wrote:

Sigton wrote:

duckboycool wrote:

Wouldn't you want a hitbox to actually look like a sprite so it seems smoother?
The hitbox would be invisible

This is workaroundable, there is a tutorial that covers this.

Sigton
idk, it causes a lot of lag on slow computers (because of constantly switching costumes)

You can combat that by having the hitbox be a separate sprite from the “Image” of the character, and having the “image” constantly going to the hitbox
pigrider2009
Scratcher
1 post

Hitboxes

but there is a sprite limmit
TheAdriCoolManDude
Scratcher
1000+ posts

Hitboxes

It would be too complex, and is workaroundable. Also if this is for platformers, Scratch isn't that.
Dgaming2
Scratcher
1 post

Hitboxes

How do i make a hitbox??
NMario84
Scratcher
1000+ posts

Hitboxes

Dgaming2 wrote:

How do i make a hitbox??

Plrese do NOT necropost a 3 year old topic.
Use the Questions about Scratch, or Help with Scripts, and create a new topic.
The_Blue_J
Scratcher
1000+ posts

Hitboxes

Vortexia wrote:

Hi everyone!
I don't think the scratch team would see this but if this got added it would mean the absolute world to me.
I suggest that we get a hitbox feature
For those who don't know what a hitbox it, here is the definition: A hitbox is an invisible box-like area that when penetrated, counts as a “hit”. It's different than the model (the visible character and his colors that you see). The hitbox is meant to compensate for lag and movement. When a character is moving, his hitbox is usually farther from the model.

Basically, I am making a platformer game and the sprite I want to use is really big. Currently in scratch the hitbox for sprites is the shape of the sprites current costume. I suggest scratch team adds a way to edit the hitbox of a sprite, so for example, you could have a circle with the hitbox of a square, and if another sprite touches the square hitbox, it will count as touching the circle.

This would be a great improvement to scratch!
I think there already is a simple workaround, place the hotbox on the same sprite and setting it to 0.03

Powered by DjangoBB