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