Stephane-D / SGDK

SGDK - A free and open development kit for the Sega Mega Drive
https://www.patreon.com/SGDK
MIT License
1.7k stars 179 forks source link

How can we cut sprites? #307

Open thomasgoldstein opened 5 months ago

thomasgoldstein commented 5 months ago

Hello!

I'd like to be able to only render part of a sprite. For example, just displaying the top of a character's sprite, and omit the bottom 16px (or whatever). From what I understand, the Mega Drive cannot do this natively.

But it has been done in the Punisher: https://youtu.be/Cje2UHXIa24?t=2698

How did they do it? Thinking about it, I believe it's like they basically have 2 sprite cutting definitions to be applied on the same sprite sheet graphics. Since rescomp automatically cuts sprite frames for you, I guess such things won't be possible unless rescomp lets you manually define how frames should be cut, and on top of that, lets you define multiple ways to cut sprite frames. Does that sound correct?

I understand this may be out of the scope of the SGDK or rescomp, because it may be too low level (as it might kinda break the current design logic), but I just wanted to confirm it.

Thank you.