Text w/out GDI
I am making a game, and I have a couple of places where I want to draw some text on the screen, right now I am using the GDI for this, but of course its really slow. I was wondering if there was some other way to write out text to the screen. Would it be faster to make a bitmap with all the letters in it, and then draw each one seperately or not? Thanks.
Also is I want to use some sound effects so I am using SndAsync, but if there are a lot of things going on on the screen, the sound gets kind of messed up. I was wondering if DirectSound would fix this and if it is easy to just play wav files with it?
Thanks
t2sherm ô¿ô
t2sherm ô¿ô
Using bitmaps is a very good idea. Just save the bitmap and append the rect''s where the characters are in the bitmap to the end of the file. There''s an article on www.mr-gamemaker.com on how to write your own TTF to bmp converter - and then how to load it up in DDraw.
"Paranoia is the belief in a hidden order behind the visible." - Anonymous
"Paranoia is the belief in a hidden order behind the visible." - Anonymous
About the text stuff, there was a thread about that some time ago. Try searching the forums for "Font engine".
- Muzzafarath
Mad House Software
The Field Marshals
- Muzzafarath
Mad House Software
The Field Marshals
I'm reminded of the day my daughter came in, looked over my shoulder at some Perl 4 code, and said, "What is that, swearing?" - Larry Wall
well yes direct sound will mix for you...
it''s pretty easy
check out the tut on DS
http://workspot.net/~kondor/tutors/letsrock.html
hmmm good luck
it''s pretty easy
check out the tut on DS
http://workspot.net/~kondor/tutors/letsrock.html
hmmm good luck
Bitmap fonts are good. Another alternative is to only update the part of the screen that needs to be updated. Say you have a control panel with the score and stuff at the bottom of the screen. Only delete and redraw the top part of the screen. Then when the score changes you delete and redraw that part of the screen.
JoeMont001@aol.com
JoeMont001@aol.com
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement