..
Poth on Programming Hitboxes in C
Sunday WOOOOOORK WOOOOOOOOOO!!!!
I ported this simple and clean collision algorithm to C using raylib.
All credit goes to Frank Poth from Poth on programming for this cool solution for collision.
Here is the repo for it.
Check out this sick screenshot.
Ze caveats
Now, despite this being a nice clean solution, it’s not without its drawbacks. The biggest one being that if the player gets the right sub-pixel, they can phase through platforms. However, that can be mitigated with better level design and I don’t foresee this being that big of an issue. Here’s hoping I don’t have to eat my words on that. Thanks for reading, Have a great week!