supertux icon indicating copy to clipboard operation
supertux copied to clipboard

Rotating hitboxes [HELP WANTED!]

Open Rusty-Box opened this issue 5 years ago • 12 comments

Something that would be really benefitial is having rotateable hitboxes (for mechanics like swimming, swinging on ropes, rotating platforms etc.).

If you know how to do it in C++ we would be thankful for your help and support!

Rusty-Box avatar Jun 24 '20 10:06 Rusty-Box

Ping to our known coders, in case one of you has some knowledge to share - @tobbi @HybridDog @Zwatotem

Rusty-Box avatar Jun 24 '20 10:06 Rusty-Box

I have my algorithms & data structures course (including geometry algorithms) semester ahead, so I don't know. I'd probably be able to do something with rectangles, but no physics.

Zwatotem avatar Jun 24 '20 11:06 Zwatotem

What about going straight for convex polygons? Since this is an occasion for changes, maybe do it right away, and not rise similar issue in a couple months? I mean, if you can't really predict any usecase for polygon hitboxes, then we'll stay with rectangles, but otherwise I think it's worth it.

Zwatotem avatar Jul 08 '20 07:07 Zwatotem

@Zwatotem What would be the benefits we get through polygon hitboxes compared to rectangles?

Rusty-Box avatar Jul 08 '20 09:07 Rusty-Box

I think some larger creatures object like bosses could be better modeled. Although in most cases I can think of they would require concave polygons, some things (like a large snowball featured rarely in bonus levels) gain on this undoubtly.

Zwatotem avatar Jul 09 '20 14:07 Zwatotem

Although in most cases I can think of they would require concave polygons […]

That's probably not a problem because often those concave polygons can be decomposed into smaller convex polygons.

A polygon could be used for this spike, but it would break backwards-compatibility. I'm sometimes wondering how it is possible to get hurt by this almost 60 degree spike. up

HybridDog avatar Jul 09 '20 15:07 HybridDog

Not strictly related to polygon hitboxes, but these single sided spike tiles will hurt you from any angle. You can jump and hit your head on the wood block part of this spike and it'll hit you. On top of this spikes aren't solid blocks which is odd.

Alzter avatar Jul 16 '20 13:07 Alzter

Do you really think priority urgent is necessary here?

tobbi avatar Oct 18 '23 12:10 tobbi

Not anymore really. While I'd still consider it urgend to have it for stuff like swimming and, which has rotating sprites, we have functional alternative for the time being. So yes and no.

Rusty-Box avatar Oct 18 '23 12:10 Rusty-Box

Better?

tobbi avatar Oct 18 '23 12:10 tobbi

Not anymore really. While I'd still consider it urgend to have it for stuff like swimming and, which has rotating sprites, we have functional alternative for the time being. So yes and no.

Tbh i feel like swimming with a rotating hitbox would be very annoying.

tylerandari13 avatar Oct 18 '23 12:10 tylerandari13

Don't know how since the hitbox will match Tux's actual sprite so it is even more predicatable when you get hit or not

Rusty-Box avatar Oct 18 '23 12:10 Rusty-Box

Don't know how since the hitbox will match Tux's actual sprite so it is even more predicatable when you get hit or not

I guess for me it depends how Tux reacts when he turns around and his hitbox crashes into a wall.

tylerandari13 avatar Oct 18 '23 12:10 tylerandari13