Game Programming, Etc.

Games, programming, and related topics — by John Giors

Archive for the ‘Shareware’ Category

SDL_pfont project kickoff

Posted by jgiors on 2006-04-18

INTRO

If you haven't heard of it yet, SDL is a cross-platform 2D graphics library, which also includes a few other features, like mouse/keyboard input.

WHY MAKE ANOTHER SDL FONT SYSTEM?

There are many libraries that run on top of SDL. Among them are several font libraries. I have taken a look at all the ones I could find, but they seem to share the following drawbacks:

  1. They include other libraries. Typically, they will at minimum require SDL_image , which then includes Zlib. It is also common to require some other special library (e.g., SDL_ttf requires FreeType).
  2. The format is not very efficient to draw. Most font formats require pixel-by-pixel processing. It would be nice to just make one rectangular blit per glyph.

Please don't get me wrong. I'm not criticizing these libraries. Several of them are very good at what they do, e.g., SDL_ttf is good at letting you write code that uses TrueType fonts quickly and easily. But there should be a better option for games programming, where simplicity and speed take precedence.

That is why I'm beginning work on SDL_pfont. It addresses both of the above issues by splitting the project into:

  1. A simple proportional font rendering system.
  2. A tool that processes a source image to produce a font.

I plan to release SDL_pfont as open source (assuming I feel comfortable with the resulting code). Here are the requirements I'd like SDL_pfont to meet:

FONT RENDERING SYSTEM REQUIREMENTS

  • ANSI C interface
  • Simple data structures
  • Does not require any libraries except SDL (and a few standard C routines).
  • Uses BMP format for texel data (since SDL supports BMP natively)
  • Font is stored in a disk format matching the memory format

TOOL REQUIREMENTS

  • ANSI C preferred (I might use some simple "C++ is better C" constructs).
  • Command-line utility
  • A plain-text configuration file defines the expected actions
  • Process a source BMP image to produce:
    • An output image containing the font glyphs
    • An output file containing the font data (in the target's native format)

CONCLUSION

And, that's it for now. I'll post updates as the project continues.

Posted in Open Source, Programming, SDL, SDL_pfont, Shareware | Leave a Comment »

FolderMatch

Posted by jgiors on 2006-04-05

My brother recommend FolderMatch for syncronizing files between systems.  I'm gonna give it a try ASAP.

Posted in Applications, Shareware, Tech | 2 Comments »