[SDL] Multiple Images in one file

ben.campbell at cyberlife.co.uk ben.campbell at cyberlife.co.uk
Wed Aug 25 00:06:43 PDT 1999


> >d00d, write your own animation format. It's easy as hell. 
> Just write out the
> >surface->pixels to a file for each frame, and then load all 
> of it into memory
> >with the same specs etc, it's easy.
> 
> Better to stick with some standard so people can mess around with the
> artwork after the fact (if it's open source). Nice to have 
> open data files
> along with the open source code.

Also, it means an easier change to another format if the need arises.
Hypothetical example: maybe you'd like a lean version with a quick download
time - just convert your graphics to jpeg and rewrite your loading routine.

On the other hand, there's a lot to be said for making up a simple
multi-image format when you're dealing with many many little sprite
images...

Most important thing - keep the actual source of your imagery (eg bmp, png,
roll-your-own-custom-format, algorithmically generated, whatever)
independant from how it is used, so if you change your mind later on it's
not such a big deal.

Ben.
--
Ben Campbell (Antipodean Straggler)
Programmer, CyberLife Technology Ltd
ben.campbell at cyberlife.co.uk



More information about the SDL mailing list