Jump to content
  • Advertisement


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


In-Game Text Engine

This topic is 6920 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 developing a game that has speed requirents much to great for GDI. Now, I know this is kinda like the other guys font post, but his didn''t answer my questions, so im just gonna post it here . Back in the day when i programmed in DOX Mode X, I used a 8-point ASCII font that was at a base address 0xF000:FA6E, if anyone knows or remembers (or cares, (sigh) ), to blit text, and it was pretty damn fast, know-what-I-mean? I was wondering if this would be an appropiate font to use for my game, which is right now idealy 800x600, 16 bit. I was thinking that this font might be too small, or the font might not be at that address in Windows (who knows, it Windows , and I havn''t tested it yet). The question is: Should I just create a font bitmap file (like the other guy wanted to do) and blit from that, or load that special ASCII font (i havn''t tested , or in the worst case use GDI for now and see how that goes? Any additional insight/information would be appreciated!

Share this post

Link to post
Share on other sites
You have a couple of choices:

First, you could just let GDI do the work. it''s not _THAT_ slow, and you get alot of fonts to choose from ;-) plus you get font coloring and other effects (bold, italic, etc.) for "free".

Another method is to make your own bitmapped font. Just like any other set of sprites, draw your text in your favorite paint program and save them off. You can "mark" baselines and character widths with signature pixels just outside of the normally drawn area of the font. Generally, you''ll want to load the bitmap and then split each letter into it''s own surface (that avoids the problem of having a DX surface wider than the display, which causes some video cards fits). The advantage of this method is that you can get some pretty fancy text effects with your paint program. The disadvantage is that it''s a pain to change the font and recompute text metrics, etc.

A third method is to use the GDI to render each needed character of your font at runtime, using the text metric
information from the GDI font into a one DX surface per letter. The advantage here is that you get all of the speed of blitting letters, and all of the flexibility of using the GDI font renderer.

Good luck.
-- Pryankster

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!