Zal0 / ZGB

Game Boy / Color engine with lots of features

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Request to change sprite collisions

p1nhead98 opened this issue · comments

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.

commented

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

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.

commented

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

  • Create a new sprite for crouching and then spawn it while hiding the other one
  • update the sprite struct changing the current metasprites, bank and collisions...