Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Speed issues with fonts.

This topic is 6156 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Im currently using bitmap fonts after having modified the code from nehes tutorial ( lesson #13 ). They are working perfectly, however, whenever I display even a simple 5 letter word on screen my fps takes a massive hit, 15-20 fps. My computer isn''t the highest spec machine on the planet, so a loss of 20 fps is a pretty big hit. Now is this problem inherent with the use of bitmap fonts? If so what is a better method to display text to the screen? Thanks in advance for any help.

Share this post

Link to post
Share on other sites
the fonts used in lesson 13 are very slow, because (correct me if I''m wrong) but every dot is an individual vertex... and if they are scaled, you could be rendereing 1000''s of dots... which is utterly pointless. and the bigger the text, the more dots to render seperatly.

using texture mapped quads, using a font texture is easily the fastest, and in my opinion, the best looking 2D way to display text. that way, it''s 2 triangles per letter, no matter their size.

it''s just more complex compared, as you have to go into alpha channel usage.

Share this post

Link to post
Share on other sites
yeh i noticed that too
i did some testing a while back
so i cant recall the exact results
but i recall that using the non bitmap fonts gave my fps a massive beating
i was getting more then 200+ fps with bmp fonts after writing more then 20 - 30 letters
cant recall
coulve been just 100 but still the more u type the worse the performance

btw how u ppl handle the alpha channel stuff when cr8ing the font piccis?
i use photoshop 7 and altho i can get the alpha mask quite easily
it tends to look quite shit
well ive found ways of improving it but yeh
any suggestions?
i mainly need it coz when the letters are small they are impossible to read

Share this post

Link to post
Share on other sites
I use GIMP (win32 port) to make the alpha channels for my images, or I make two seperate bitmaps and use my own code to join them into a single png with alpha channel.

One thing I do though in font and icon displays is not bother with an alpha channel in the file (saves a little bit of space and time in making the image - can use ms-paint this way). Instead I designate a colour (I use 24bit so I have a fair bit available) to the "invisible" colour. When the file is loaded, it simply cycles through the image, and if it it is the "invisible" colour, it sets the alpha channel to 0, otherwise 1.

This method does slow down loading time (extra cycles) but it makes the image creation easy as hell.

Beer - the love catalyst
good ol'' homepage

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!