TrueType Fonts and more...

Published May 17, 2007
Advertisement

TrueType Fonts


I'm no longer using bitmap fonts, thanks to the FreeType Library I can render TrueType fonts at much higher quality than I was initially. Here's a shot to prove it:



(True Type font is the bottom one [smile])

XML Parsing (TinyXML)


Just added really basic support for using XML to define 'rooms' within the game through TinyXML. If you look back to yesterday's entry, you will see a textured 4x4 room, which is now defined in XML by:

"1.0" encoding="utf-8"?>"1"  name="Test Room" size="4">  "wall_01.tga" />  "floor_01.tga" />


The room element's id attribute will be used by the game engine to find the next room to enter when the player exits the room they are currently in.

At the moment the floor and walls of a room don't offer much flexibility in terms of texturing. Eventually a room will be stored as a 2-dimensional array where each cell can have it's own unique texture sets.
0 likes 2 comments

Comments

Mushu
Hrm, FreeType looks like a pretty nice library (I've always used SDL_TTF to generate my glyph textures) - any opinions on how easy/difficult it was to integrate with your current system? lol, I hate font stuff, it always seems to start nice and easy but quickly becomes a nightmare for me :[

Also, only square rooms? [sad]
May 17, 2007 03:34 PM
FunLogic
It wasn't to difficult to incorporate with everything I had already done. There are some great tutorials out there that can show you what parts of the library you need to use, and what you have to write yourself.

As for the square rooms - I'm hoping to put a stop to that today, as soon as I have refactored all the messy code I threw in yesterday.
May 18, 2007 03:01 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement