Discord
Login
Community
DARK THEME

Inbuilt Hit boxes?

I feel like the ability to pick a sprite or select a tile and add a hit box would make development way faster. Also being able to group hit boxes and set different events on collision between groups of hit boxes would be nice. A few basic "types" of collison would be nice too. For example,

"Default" could detect all hit boxes in it's set group

"Solid" could detect if a player was touching another solid hitbox in it's group and make it so the solid or default hit box can't move through it

"Trigger" could trigger an event like changing maps or triggering a cutscene or damaging the player and so on

"Custom" could be a blank slate that detects any hit boxes you tell it to (maybe not necessary, because you could just edit the parameters and behaviors of any of the aforementioned options)

As an almost complete beginner who has pretty much no idea what i'm doing. It's pretty hard to wrap my head around writing a script to create and handle collision. That combined with not really knowing how to assign said collisions to sprites/tiles is kind of a roadblock.

I hope this doesn't sound like i'm complaining about not knowing how to script XD. I just feel as though it's unnecessary to have to script your own hit boxes into existence, and i think it would seriously increase the speed of the workflow for noobs "and" pros.

Collisions are quite a complex subject, everyone needs something different.
But I'm sure over time more libraries will show up and we never know what's on @gilles to-do list ;)
In the meantime, have you tried his Quickengine library?

https://youtu.be/Vbngp4hF1nM

In MicroStudio you have a physics engine library. See documentation - Optional graphics and libraries. (2D Physics Engine - matter.js)

If you check collision only for squares and rectangles then try the AABB algorithm.

https://microstudio.dev/i/JimB007/matterplayground/

https://microstudio.dev/i/gilles/quickengine/

https://microstudio.dev/i/MrBoi/m2dbasiccollisions/

ooOOOoo nice! i'll definitely check those out, but i think i might switch back to Solarus. Just because it has pretty much exactly what i need. I will however still use micro for small projects and prototyping, and who knows! When i get a little more experienced, i may be able to make bigger contributions than i have in my time on here

thank you all so much!

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community