Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2019-02-09 01:20:13

h0tp3ngu1n
Member
Registered: 2018-09-11
Post 1/16

How can text be displayed other than 8px monospace?

Hello! I am new to Game Boy homebrew and to ASM in general, but I did manage to get a simple hello world program running.

There is something I am wondering though. I notice that the English version of Pokémon TCG for GBC used a 4px monospace font. How is this possible, since tiles are 8x8?

Last edited by h0tp3ngu1n (2019-02-09 01:21:04)

Offline

#2 2019-02-09 01:45:36

Rangi
Member
Registered: 2016-05-09
Post 881/917

Re: How can text be displayed other than 8px monospace?

Hi! 8x8 is a convenient size for a monospace font because you can preload each character to a particular address—for example, "A" at tile $80 in VRAM bank 0—and then printing text is just a matter of assigning the right tile IDs to the BG map.

Different sizes, like the 4px wide TCG font or the variable-width font in this demo (screenshot; builds with rgbds 0.0.2), work differently. There the tile IDs are fixed and the characters are printed into VRAM. For example, a textbox at the bottom of the screen might have tiles $80, $81, $82, ..., and the text gets printed there. BGB has a VRAM viewer that will probably show that sort of technique if you open it with TCG.

Offline

#3 2019-02-09 12:58:00

h0tp3ngu1n
Member
Registered: 2018-09-11
Post 2/16

Re: How can text be displayed other than 8px monospace?

Oh, I see. Thanks for the help :)

Offline

Board footer

Powered by FluxBB