Page 1 of 1
Sprite array
Posted: Tue Jun 02, 2015 10:19 am
by Mills
Hi.
I want to load this image, so that each character is a separate sprite, is this possible in sgdk?
Image:
I'm using this to write short text strings using the sprites.
Thanks.
Posted: Tue Jun 02, 2015 4:42 pm
by MrTamk1s
It would be a better idea to simply upload the images' tiles into the VRAM slots occupied by the built-in SDGK font, instead of making each tile its own sprite. That would save precious sprite slots and require less memory overhead than using the Sprite Engine or dealing with sprites. As for those special characters (like the ones near the end), I would make a function to grab each special tile by an ID number or #define constant.
Posted: Tue Jun 02, 2015 4:58 pm
by Stef
Of course you can load the image then use it to display text from sprite but as suggested MrTamk1s i think it would be better to override the default font using your image with VDP_loadFont(..) included in SGDK so you can directly use the classic drawText methods.
Posted: Tue Jun 02, 2015 6:02 pm
by Mills
You are right, i didn't realize i could do that.
I'll just have to print every character alone whith its own x,y, to make the effect I want.
Thanks.