Jump to content
  • Advertisement

Archived

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

Sailorstick

Faster Text Drawing?

This topic is 5328 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

I''m using DirectDraw for my game 2D tile based game. Each ''unit'' on the map has stats displayed next to it (eg. 3/3) the problem is when I am drawing the stats I go down to 15FPS from the 100FPS without drawing the stats. I''ve had a look at all the samples in the SDK and they all use the Windows GDI function ExtTextOut so I used it as well, but it is just too slow. Is there nothing in DirectDraw that can display text faster? I am thinking of making a bitmap character set and just blitting that instead.

Share this post


Link to post
Share on other sites
Advertisement
Well one way to speed things up a bit would be how I did it in my game. What I did was add an array to hold whether or not it was time to redraw text to the screen. I won''t show you the code because it was LONG but, you could also try DrawText, it is a standard windows function and it only slows my games down to 30fps. I''ve seen a function called wsprint that seems even faster but I could never get it to work.
By the way drunkenhyna''s suggestion that you use bitmaps is probably the best. I used to use the GDI but now I use bitmaps. I did speed my game up around 40%, but don''t expect to see your game run 100 fps either way. If you need an example of how to bitmaps for numbers send me an email and I''ll send you the some code to show you how.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!