🔒 Locked
Font Engine..how to?
Advertisement
Original Post
Sup every1. I''m trying to make a simple mario-clone game. I''m using the engine that came with the Tricks Of the Windows Game Programming book(with some modfication). I want to implement some text info(at the very least, the current score accumulated) shown on screen. La Mothe says using the Windows GDI for it would slow things down. Anyone can help me out how to start my very own font or at least point me to the proper direction?. Thanks.
I''d make a bitmap with all the characters in a font, then blit the right parts to the screen to make the text.
A great bitmap font builder program can be found at http://www.lmnopc.com
- Pete
Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
A great bitmap font builder program can be found at http://www.lmnopc.com
- Pete
Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
A good learning experience (I know, I did that) is to implement your own font exporter. Just take a look at http://www.freetype.org.
[ Libraries - STLport | boost | SDL | wxWindows ]
[ Manuals - MSDN | STL Docs ]
[ Compilers - VS.NET | MingW | DJGPP ]
[ Editors/Tools - EditPlus 2 | Anjuta | Dev-C++ ]
[ Libraries - STLport | boost | SDL | wxWindows ]
[ Manuals - MSDN | STL Docs ]
[ Compilers - VS.NET | MingW | DJGPP ]
[ Editors/Tools - EditPlus 2 | Anjuta | Dev-C++ ]
Nope not dx..it''s a windows call that shows text onscreen. It uses TextOut for it. The problem with it is it slows down my game during da first minute ( my character moves noticeably slow a bit for a few sec then it goes back to normal...or maybe it''s coming from somewhere else...)
Thanks for da replay guys. I''m going to implement it using that "each-letter-is-a-bitmap" routine. Just as long as the scores are readable, it''s all good. THanks
Thanks for da replay guys. I''m going to implement it using that "each-letter-is-a-bitmap" routine. Just as long as the scores are readable, it''s all good. THanks
Gameover,
I personally like the windows GDI functions. They''re quite powerful and I have not noticed a performance difference (yet) on my P2 450. It would take a lot of work to wrap all of the functionality windows has in their GDI functions.
Checkout the DrawText() function in addition to TextOut()
~Rufe
I personally like the windows GDI functions. They''re quite powerful and I have not noticed a performance difference (yet) on my P2 450. It would take a lot of work to wrap all of the functionality windows has in their GDI functions.
Checkout the DrawText() function in addition to TextOut()
~Rufe
Honestly, I made a font class that loads in a bitmap with text and blits each letter, but I didn''t get much of a gain in my framerates. Plus I didn''t have anywhere near the functionality that GDI font functions have. IMHO go ahead and make a bitmap font class for the learning experience and then use GDI functions in your actual game.
The only problem with GDI is that you have no much freedom in creating beautiful and expressive fonts or adding some static effects as you can do by telling your game artist to make _really_ good font for you.
So, use GDI for testing purposes, and bitmap fonts for real game. But not vice versa
So, use GDI for testing purposes, and bitmap fonts for real game. But not vice versa
I recently made a graphic font system, the tricky bit was getting the kerning (is this the right word?, each character was a different width) right.
I made it so I had more control over the fonts, and could have them looking exactly like I wanted, also it was a pretty fast function, you can see pictures of it here: www.markyrose.freeserve.co.uk (scroll down a bit on the main page) : I will be using it in the game Im working on.
[edited by - stevenmarky on April 12, 2002 5:57:22 PM]
I made it so I had more control over the fonts, and could have them looking exactly like I wanted, also it was a pretty fast function, you can see pictures of it here: www.markyrose.freeserve.co.uk (scroll down a bit on the main page) : I will be using it in the game Im working on.
[edited by - stevenmarky on April 12, 2002 5:57:22 PM]
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement