Graphic Fonts
by AzraelK · in Torque Game Builder · 09/18/2006 (3:14 pm) · 2 replies
How can I use graphic Fonts for a game? Ive read a tutorial at tdn on how to use Bitmaps anywhere in a GUI but no mention on how to use Bitmap fonts.
#2
Worked pretty well for our needs!
Just be aware that this is great for a couple fonts but once you start using it lots the additional memory/cpu overhead (particularly memory) might warrant integration of the 2dTextObject resource as well!!
Hope this helps?
09/21/2006 (4:27 am)
For our game we just created a tiled imagemap of the letters a-z and 0-9, and just assigned them all a variable name in an array so $titlefont[a], $titleFont[b] etc. Then we wrote a stringWritefunction which accepted a string, size, font name and starting location, plus a couple of justification parameters (left allign, central around the world point, or right alligned), which took the string and printed in a row a series of t2dstaticsprites.Worked pretty well for our needs!
Just be aware that this is great for a couple fonts but once you start using it lots the additional memory/cpu overhead (particularly memory) might warrant integration of the 2dTextObject resource as well!!
Hope this helps?
Torque Owner AzraelK
Anyone? Ive heard theres already a library of sorts for that, but searching through the tgb forums is basically impossible with the current "google search" we have
Update:
Oops! by searching BITMAP FONTS instead I did found the t2d library I was talking about, unfortunately is only for TGB professional (source code)
Does anyone know about this library for TGB regular indie users?