[SDL] "explosions" demo

William Kendrick nbs at sonic.net
Tue Jul 31 16:20:01 PDT 2001


I've been playing a lot of Twisted Metal: Black lately, and have been
enjoying the cool fireworks/sparkle-like effect for some explosions.

So, I was bored last night (my girlfriend was playing TM :) ) and decided
to try and whip something up.

It started out as plain 2D at first, but I yanked some cruddy trig. and 3D
code out of my old "ICBM3D" vector-based Xlib game and came up with
something semi-entertaining.

Best of all, I've totally commented the code (more so than usual :) )
so some of you might find it useful, even! ;)


  ftp://ftp.sonic.net/pub/users/nbs/unix/x/explosions/


Included is a .tar.gz (of the source, makefile, documentation
and PNG sprite files) as well as a GIF screenshot of the thing running.


It uses a lot of alpha-blending, and the 3D objects are sorted using
a *cough* bubble-sort, so it might be slow on some older machines.


It requires libSDL and SDL_image.


Enjoy!!!


-bill!




More information about the SDL mailing list