is drawtext could be too slow for my game
BlitzMax Forums/BlitzMax Beginners Area/is drawtext could be too slow for my game
| ||
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 : ![]() |
| ||
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. |
| ||
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. |
| ||
Thanks for yours replies. no need gradient characters for this game. as i must display a lot of messages i need entire characters set. |
| ||
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! |
| ||
Or search this forum and the codebox for free bitmapfont-code. (sorry Grey;) |
| ||
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 :) |
| ||
Grey - does your framework support Fontext fonts yet? It is free after all. :) |
| ||
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 !!! |
| ||
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. |