GP32 Score Font


Tealion

Still Fresh
Joined
Mar 15, 2004
Messages
33
Age
37
Location
Exeter Devon UK
Website
Visit site
Hi.

I am currently trying to make a game and I am stuck trying to get a score system working. I know how to make the basic system but I don't know how I can change the font in order to get it to look nicer :(

Is there a way of setting the font or will I have to do it all using tiles?
I am using Mirkos SDK.

TIA

Tealion
 
hmmm...

there was a program the gp32 projects page that would change the font in any fxe program...

but that page is gone (last i checked...)...
 
That program (I don't know it, tbh) may work with Gamepark SDK, but it won't work with Mirko's SDK. Basically, changing the font isn't too hard, but requires to recompile the SDK after exchanging gp_8x8font.c in lib.src/font.
Actually, the better way is to write your own dedicated font system. It's pretty easy and allows you to use whatever you want. (I wrote one for multicolor fonts, can't find the archive at the moment, but i'll rip it off one of my game's source if necessary)
 
Thanks, that would be great :)
Would you have to somehow make a sort of tiling system that looks up the place of each letter in a bitmap or can you create an array of data for each letter of the font then display it like that.

Thanks for your help
 
http://gp32.chemicalkungfu.de/trash/textout.zip

If you're using a rather new version of Mirko's SDK (after that bad syntax change, to be exact), you'll need to alter the gp_SetPixel command to the new one. I've included the font I used in the font.bmp file, so you might have a slight understanding what I did with all that ascii codes in the source. Btw, I got that font from http://www.algonet.se/~guld1/freefont.htm which is a great site for that stuff! It's a pity the main content is down for some days already...
 
Yay! :D
After a few hours fiddling with the code I got it to work :)
Now I just have to try and figure out my own version of the function for my game.

Thanks for your help :)
You have helped a newbie GP32 developer on his way to making his first game :)
Thanks again :D

By the way. How did you convert the bitmap?
 
Mirko supplies 2 useful tools with his SDK, a modified bmp2bin and convert:

bmp2bin -x font.bmp font.raw
convert font.raw > font.c

edit font.c so that the variable name suits your needs, done.
 
Back
Top