spritelibtest screenshot [SDL Powered] This is Spritelib, a crossplatform C++ object-oriented isometric gaming library based on SDL, bitmask-1.1, and SDL_image. Bitmask is linked in statically, while SDL and SDL_image are used as shared libraries. It's features include
  • Bounding-box and bitmasked collision detection through the Bitmask 1.1 collision library
  • 32-bit fixed point coordinates, framerates, and trigonometry
  • Screen rotation for odd screen geometries(240*320), enabled at compile time(Experimental)
  • Run-time loading of sprites from parameter files
  • Fast sprite-blitting via partial screen updates
  • Highly efficient use of CPU time
  • Game object intercommunication
  • Garbage collection
  • A simple object-oriented framework for arcade game creation
  • Online Documentation

I created this library while coding a remake of the C64 classic Crossfire, but the game engine soon outgrew the game, so I made it a shared library instead. Crossfire versions 0.0.6 and up rely on Spritelib for the bulk of it's code.

The idea behind this library is to encapsulate a sprite in a self-sufficient object, set up simple rules to describe how these objects interact, then turn 'em loose and let the framework do all the work. Right now, Crossfire is the only game based on this library but I intend to write a couple more extremely simple games to give a less complex example of how to use it.

Note - When configuring crossfire, depending on your system's configuration, you may need to tell configure where to find the spritelib shared object - i.e.

./configure --with-extra-libs=/usr/local/lib

Update -- spritelib 0.0.8 has been released, including a critical memory leak fix, and some timing fixes for smoother animation. Upgrading is reccomended.

Update -- spritelib 0.0.7 has been released. This includes a minor bugfix for total-screen redraws, preventing it from drawing sprites that have expired one frame earlier.

Update - spritelib 0.0.6 has been released for UNIX®. The event loop will now properly handle negative framerates instead of puking on them. Additionally it now rounds fixed-point numbers up or down when converting to int, instead of just truncating the fractional portion of the number.

Update - spritelib 0.0.5 has now been released for Windows®, and Crossfire 0.0.8 along with it.

Update - spritelib 0.0.5 source tarball released. Contains some simple optimizations to sprite collisions and support for double-buffered video surfaces, but most importantly contains a bugfix for the offscreen-sprite problem. Sprites with off-screen positions will no longer cause the program to hang. (they won't be drawn either, of course.)

Update - spritelib 0.0.3 source tarball and evc3 project files released along with Crossfire 0.0.7.

Send comments, patches, ports etc to Tyler Montbriand

spritelib 0.0.8 src tar.gz ( 531K )

spritelib 0.0.7 src tar.gz ( 500K )

spritelib 0.0.5 MSVC project ( 600K )

spritelib 0.0.5 src tar.gz ( 500K )

Project files and ARM binaries for Spritelib/Windows CE® ( 32K )

Crossfire 0.0.8 src tar.gz ( 2.7MB )