is drawtext could be too slow for my game

BlitzMax Forums/BlitzMax Beginners Area/is drawtext could be too slow for my game

hub(Posted 2007) [#1]
Hi !

Into my project, i use drawtext in conjunction with bmax font (an .ttf file). This to show player score and some messages during the game (into english or french). In my vertical shooter game do you think that standard bmax font system is too slow ? Do you think that i should spend some time to search another solution (for example bitmap font) to optimize the game ?

No need extra work for this project. if you think that standard bmax font is sufficient tell me.

Thanks for your experience.

picture :




GfK(Posted 2007) [#2]
I'd use bitmap fonts.

I wouldn't say DrawText is too slow, but its certainly less flexible than bitmap fonts. For instance, I have one bitmap font that only contains eight characters - L, o, a, d, i, n and g, plus a fullstop. You couldn't do that with a TTF without loading the entire character set.

Plus you can have gradient fills, customised characters/symbols and so on, which you can't do with TTFs.


MGE(Posted 2007) [#3]
1st: Do whatever you can do to get the game up and running as easily as possible.
2nd: Test it on a variety of computers. As long as it's running at 30fps or higher on anything, you're fine!
3rd: If it's running too slow, THEN you can start to optimize things. Depending on how many things you are drawing on screen, it could be something other than drawtext slowing your game down.


hub(Posted 2007) [#4]
Thanks for yours replies.

no need gradient characters for this game. as i must display a lot of messages i need entire characters set.


Grey Alien(Posted 2007) [#5]
ttf is very easy to use (and fast, but VRAM hungry), Bitmap fonts are harder to code but luckily for you I just added them to my Framework!


Jake L.(Posted 2007) [#6]
Or search this forum and the codebox for free bitmapfont-code. (sorry Grey;)


Grey Alien(Posted 2007) [#7]
He already owns my framework so he can get a tried and tested one. Hub: If you want me to send you a prerelease of V1.05 of the framework I can do. Just email me. OR sure search the forums there's LOADS of cool stuff here :)


Beaker(Posted 2007) [#8]
Grey - does your framework support Fontext fonts yet? It is free after all. :)


hub(Posted 2007) [#9]
Many thanks for your offer Grey, no need yet the latest version of your framework. i'll try your font system when you release it. Before i must correct some others bugs !!!


Grey Alien(Posted 2007) [#10]
OK fine. re: bugs, me too :-)

Beaker: It's on the to do list! Originally I was going to support it first, but because I ended up using Indiepath's bitmap font code as a basis I used the fileformat produced by the app he recommended.