12-21-2018, 08:18 AM
Hi again, thanks for the explanation, it helps to understand.
Most of classic games used a monospaced font where each glyph used the same number of tiles. Then it's super easy to render text, just update the tilemap layer containing text in realtime. That's exactly what the "Retropang" example does in the score area in the bottom of the screen:
https://www.youtube.com/watch?v=3x-RmMktoO0
You can download full source project here:
http://www.tilengine.org/downloads/RetroPang.zip
Advanced variable width text systems of that era, as the jrpg you mention, used a two step process. They use a contiguous range of tiles inside a tileset as a "virtual bitmap", that uses as many tiles as it is required to fill the rectangular textbox on the screen, and that textbox is a tilemap that maps to those tiles in the tieset. Then blitted by software the individual glyphs (not tiles!) to draw the text onto that "virtual bitmap" inside the tileset zone, creating tile data in realtime, that was reflected in the screen. In other words, those systems weren't able to do complex composition to the screen (there wasn't a framebuffer at all), but they could manipulate the tilemap memory as a virtual bitmap because that was just regular memory that could be modified at will.
A side effect of that is that in those games, you always see the text being constructed sequentially, even when you pressed the "skip" button: the text presentation accelerated but didn't show instantly: that was the CPU blitting the glyps by software. Those CPUs were meant to do small writes to registers, not to do expensive software blitting that couldn't be done fast enough.
I hope you catch the idea! And I look forward to see your work in progress
Most of classic games used a monospaced font where each glyph used the same number of tiles. Then it's super easy to render text, just update the tilemap layer containing text in realtime. That's exactly what the "Retropang" example does in the score area in the bottom of the screen:
https://www.youtube.com/watch?v=3x-RmMktoO0
You can download full source project here:
http://www.tilengine.org/downloads/RetroPang.zip
Advanced variable width text systems of that era, as the jrpg you mention, used a two step process. They use a contiguous range of tiles inside a tileset as a "virtual bitmap", that uses as many tiles as it is required to fill the rectangular textbox on the screen, and that textbox is a tilemap that maps to those tiles in the tieset. Then blitted by software the individual glyphs (not tiles!) to draw the text onto that "virtual bitmap" inside the tileset zone, creating tile data in realtime, that was reflected in the screen. In other words, those systems weren't able to do complex composition to the screen (there wasn't a framebuffer at all), but they could manipulate the tilemap memory as a virtual bitmap because that was just regular memory that could be modified at will.
A side effect of that is that in those games, you always see the text being constructed sequentially, even when you pressed the "skip" button: the text presentation accelerated but didn't show instantly: that was the CPU blitting the glyps by software. Those CPUs were meant to do small writes to registers, not to do expensive software blitting that couldn't be done fast enough.
I hope you catch the idea! And I look forward to see your work in progress