Triangular hitboxes and animation property.

triangle hitboxes

Triangular hitboxes are really important now, but thats not just it. If you dont have a plan for making it, I already have the specs for how to generate it. You will need X1, X2, and Y1, but not Y2. For the 3 corners.

There are 2-3 types of triangles that should exist. Right triangles, and equilateral/isosceles.

Right triangles have the specs I mentioned on Mhxs skeleton mapping thread.

And equalateral/Isoscelese triangles are composed of two back-to-back right triangles.

animation hitbox property

Basically makes each and every frame have its own hitbox. Might be laggy, but would be essential for @“Mhx Ar” when it comes to ducking animations.

@grazer

Triangles are important for me, because I can make hills that aren’t slippery. I’m using stacked pixels to glide over as a circle. I’d rather have hills that aren’t essentially bumpy slides.

Tagging him more won’t make him see it faster. He probably doesn’t log in every day.

@grazer

Yeah… sometimes it doesnt go through

== TRIANGLE COLLIDERS ==

Hey, so this triangle collider idea has been coming up a lot recently - seems like it’s becoming a more crucial feature.

I’ve been thinking about how to implement it recently. The simplest approach would probably be to make it work the same as the the existing collision shapes, and have it just figure out the smallest bounding triangle and use that. Basically if you have a triangle shaped sprite, and select a triangle collider, the collision shape would be basically the same as the sprite.

The more involved approach, which would also be more flexible (but take more time) would be a collision shape editor where you manually edit the collision shape. I need to think a bit more about how this interface would work - it might be nice if it could be added to the sprite editor, not sure.

I’m not sure which one make more sense at this point, but it sounds like I should move this feature up near the top of the list.

== ANIMATION FRAME COLLIDERS ==

Now, this one is a problem. The main issue here is that collider shapes cannot be changed while the physics simulator is running. In order to “change” the collision shape, the old one has to be destroyed and a new one created. This is possible, but certainly has the potential to be laggy or enable some really strange or unpredictable behavior.

@grazer how otherwise would you suggest doing stuff like crouching and morph ball hitboxes?

@grazer also, before you were wondering how I did the semi transparent jump through ground with the position trick in my game. Well it would be much easier if I could temporarily disable only collision for a frame or so, rather than using the position, or if I wanted temporarily to pass through objects like a ghost or something. Using disable collisions, I could bind my own hitboxes with attachments and alpha.

I’m not sure how morphballs will work - I’m not saying it’s an impossible feature, just that it’s a hard problem to solve.

To temporarily disable collision, can’t you use “Enabled”?

@grazer for the custom shapes editor, I imagine it should look like this:

[add point]
[connect point]
[remove point]
[disconnect point]

It would have this grid that overlaps the existing sprite.

@grazer
For enabled, it used to work differently, but back in my first game (Diamondsion Assault), it works like it does now. Originally, disable froze the player and disabled collision. You would float in the air and be unable to move. Enable let you fall again and move.

This was 4 years ago. You saw me using that as a way to levitate, and made an update so I wouldn’t float in my game and could move while disabled.

Just the other day I tried it in that skeleton mapping game, and my character became frozen in place again. If you set disable to only disable collision instead of all functions, then I can use it to jump through walls and ground based on proximity.

Sorry, I misunderstood - you are correct that “disabled” disables all physics. I was thinking you meant disabling the platform collision, not the player collision.

That would mean every single ground tile in the entire game would need an active proximity, and that would be extremely laggy and unreliable. I tested this once before with a Fez game, and used animation instead of making it disable, and only one of those tiles played an animation, while the rest did nothing. So because of that, I decided it would be easier to make the player not have collision, besides, if I disabled collision on the platform, and an enemy was above it, the enemy would fall through when I jump, and that would look terrible.