Archived

This topic is now archived and is closed to further replies.

RegularKid

GameBoy Advance Fonts...

Recommended Posts

I am programming for the gameboy advance but I''m kind of stuck right now. I want to have a 16x16 font for my game. So here is what I figured: I need 26 letters (no lowercase, just uppercase, so I only need 26, not 52) and 10 letters. That makes 36 16x16 tiles, which, if I''m using 16 colors = 36 x (4 x (16 x 16)) = 36864 bytes or 36kb. Now, sprites are out of the question because I only have 32kb of character data. So, this means I need to use backgrounds for the font. That sounded good to me until I went to implement it and realized that each character base block is only 16kb. This means that I can''t use just one background for the font?! So, you see, I''m stuck on how to do this. How do professional GBA games do this, because games like egg mania use 16x16 fonts and have tons of other graphics as well. Any suggestions?

Share this post


Link to post
Share on other sites
Something up with your maths, you want a 16x16x4-bit font, thats 4 characters (or tiles) per ascii character, or 4*32*36 bytes which equals 4608 bytes, leaving lots of room for other screen data.
Not forgetting that you can overlay multiple backgrounds on top of each other, each accessing a different page of VRAM. Which allows 4 background, each accessing 256 characters to be overlaid (not strictly true, but close enough for this answer).

NB: The 32 comes from an 8x8 character (64 pixels) but in 16 colour mode you get 2 pixels per byte, hence 32 bytes.

Share this post


Link to post
Share on other sites