Zal0 / ZGB

Game Boy / Color engine with lots of features
MIT License
706 stars 50 forks source link

Request to change sprite collisions #38

Closed p1nhead98 closed 2 years ago

p1nhead98 commented 2 years ago

Before as the collisions of the sprites were defined, you could change the collisions at any time you wanted, now as it is done through the meta is something that I do not know how it could be done.

Zal0 commented 2 years ago

Because of how metasprites are implemented and for performance reasons this cannot be done anmore. You can change the width and height but that will affect how mirroring is done so I don't recommend it The reason why this is hardcoded now is because metasprites are drawn starting with a pivot position and then adding offsets from there. This new method allows us to use sprites of any dimensions and collisions are also optimized a lot (constantly adding an offset was killing performance)

Anyway... what excactly are you trying to accomplish? Luckily there will be a different way to do it

p1nhead98 commented 2 years ago

My character at a certain point changes his vertical collision to the middle, to be able to pass through parts he couldn't stand, but well I'll have to look for another way haha.

Zal0 commented 2 years ago

I see... there are a couple of approaches you could follow: