Tweet blitz3d cross-platform fonts sprites blitzx rated
This is SpriteFont! — a wip font system that uses projected 3D sprites! I thought of utilizing sprites to render fonts as a great alternative since there are still a few kinks on my crossplatform truetype font implementation on BlitzX.
I got this idea way back when looking into a lot of demos and examples of projecting sprites in 2D like Sprite Control and other cool blitz3d sprite stuff. I have been planning to go with this route since I think this will make the project more efficient, less dependent, lighter and really simple.
Right now it only supports fixed size fonts, but the demo shown here uses bitmap fonts generated from a AngelFont or BMFont tool and format, so it is possible to do some kerning and other character alignment on future versions.
Font sizing will also be easier to manage since it just uses entity scaling like the screenshot only uses 1 bitmap font set for both size. There is a One Big Size Fits All like this one or you can also generate specific bitmap font set sizes of your choice.
SpriteFont will be the text rendering component of BlitzX to replicate LoadFont, Text and other font functions. Truetype fonts will still be supported, but eventually as an addon or userlib.
I will upload an online and perhaps update the android demos once I finalize and do some cleanup on the process!
having read a bit about how to do 2D-in-3D in GLES I can say I do think you're going in the right direction with this. In a nutshell, changing render states in GLES has several problems due to reduced GL commands.
Thanks Mark and that's great to hear! I do see and have read about it with blitz and other game engines that rendering 2D in 3D has its performance drawbacks as well.
I also did recall and know that there are other related or similar projects before like Beaker's FonText among other quick demos.
I made a little bit of progress using non-fixed fonts with basic letter spacing feature and this will be added as an option or function.
In this updated screenshot, I have used Blitz3D's default font Blitz (.fon) converted to bitmap fonts with BMFont!
Font color also now works using EntityColor and more effective if you make those exported fonts pearly whites!
Reply To Topic (minimum 10 characters)
Please log in to reply