Tilengine - The 2D retro graphics engine forum

Full Version: Text in Tilengine
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Which is the best library to render text in SDL/Tilengine?

I would like to use "\n", ttf fonts, bitmap fonts, different colors, etc...
(06-08-2018, 05:48 PM)JaumeAlcazo Wrote: [ -> ]Which is the best library to render text in SDL/Tilengine?

I would like to use "\n", ttf fonts, bitmap fonts, different colors, etc...
Tilengine doesn't have specific text support. Common practice in tiled systems is to have a fixed-width font encoded inside a tileset, with each glyph using the same number of tiles. Then rendering text is just matter of updating the layer tilemap with TLN_SetTilemapTile()

The "RetroPang" pang clone developed by RetroManiac magazine used this technique to render text. You can find the sample video in youtube and links to the source code and PDF magazine here:
https://youtu.be/3x-RmMktoO0
Thanks Marc.