Packaging graphics

I’ve recently begun working on a game, and I’m using SDL to handle
graphics. I’ve learned alot so far by reading tutorials on the net, but
there is one thing I haven’t really found information about.

I’m ready to begin adding sprites and right now I’m working on the main
player. This game is a 2D adventure game by the way. Adding sprites is
no big deal, I have that working, but my problem is this.

Right now I have a bunch of .png files for my sprites. When I look at
other games using SDL, most if not all of the graphics are in other
formats. I’m assuming they are packaged in some way to make them
smaller, but that is only a guess.

Are there any tutorials that discuss this? Are there really any
advantages, or are they really doing this to make it more difficult to
alter the images?

The game is really a rather big project, so I want it to be as
professional as possible.–
Jason Stechschulte {} @Jason_Stechschulte {} http://www.ypisco.com

It’s hard to drive at the limit, but it’s harder to know where the limits are.
– Stirling Moss

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1On Sunday 03 November 2002 00:41, you wrote:

Are there any tutorials that discuss this? Are there really any
advantages, or are they really doing this to make it more difficult to
alter the images?

I wrote a simple file packer while ago. It will just take filenames as
arguments then generate header for packet and pack everything together. When
you’re reading stuff, you read header of the file and build an array of
filenames, pointers where they are located in the file and size of the file.
When reading you just seek() to that location in the file and read the
desired length.

I did this because it’s easier to distribute around one executable and one
data file than one executable and zillion small files… :slight_smile:

This thing is not even hard to decode… :wink: Game developers probably do this
because of the same reason,… Whatever you do, it probably wont stop people
from altering graphics if they really want to do that.


David!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9xNYUz0dAgYeWS2wRAmqHAKCOEeHKBCghn7JEiPaUqqVdMjs0jQCdFcSJ
u8iYp4p5HR4+f9yLAlVHRPc=
=c119
-----END PGP SIGNATURE-----

I wrote a simple file packer while ago. It will just take filenames as
arguments then generate header for packet and pack everything
together. When you’re reading stuff, you read header of the file and
build an array of filenames, pointers where they are located in the
file and size of the file. When reading you just seek() to that
location in the file and read the desired length.

This doesn’t sound too difficult and seems rather useful. I guess I’ll
have to sit down and try to implement that myself.

I did this because it’s easier to distribute around one executable and
one data file than one executable and zillion small files… :slight_smile:

That is mainly why I’m thinking about doing it myself.

This thing is not even hard to decode… :wink: Game developers probably
do this because of the same reason,… Whatever you do, it probably
wont stop people from altering graphics if they really want to do
that.

I’m not trying to stop people from altering graphics. My game is going
to have the source code publicly available when I finally get it to the
point it is worth distributing.On Sun, Nov 03, 2002 at 08:53:56AM +0100, David Klasinc wrote:


Jason Stechschulte {} @Jason_Stechschulte {} http://www.ypisco.com

God is the tangential point between zero and infinity.
– Alfred Jarry

You need physfs:

http://www.icculus.org/physfs/On Sat, 2002-11-02 at 17:41, Jason Stechschulte wrote:

I’ve recently begun working on a game, and I’m using SDL to handle
graphics. I’ve learned alot so far by reading tutorials on the net, but
there is one thing I haven’t really found information about.