PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

storing graphics (looking for ideas)

I have not downloaded a lot of pocketPC games so I'm not sure what the common way of storing graphic and data files is

I'm looking for other developers opinions on the best way to arrange your exe and data files on client file system

I am using EasyCE so most my graphics are tga format Phantom has created the option to gzip and load zipped data file which is nice but it seems like every graphic file needs to be it's own zip file (correct me if I'm wrong as I have not experimented with it much)

Ultimately I'd like to store as many sprite graphics as I can in one TGA file and then read it in and cut it up into sections that get loaded into various bitmap data structures (I didn't see a way to do this with EasyCE )

I'm posting this to general dev forum to get ideas not just from EasyCE users

thanks !
golan_trevize_x · 06 Jun 2002, 02:52 UTC
The way I did this is probably not the most efficient, but I'll tell you anyway.

I designed a little VB app to combine a bunch of equally-dimensioned TGA files into a single file (it's really just one after the other, with a little header). Then I gzip that up.

The header (or it might be footer) contains the width and height of the images, and the number of images.

In my game, the engine unzips the file with zlib, then uses the header information to load the particular TGA file into memory. It knows the bytesize from reading the header.


I would be keen to know how you guys handle the file system, though. At the moment, I've got it hardcoded to find the files in the My Documents folder!
Conan · 06 Jun 2002, 09:27 UTC — Sprites in a TGA file
If you get the source for the lemmings demo for EasyCE ( on this board under Overloaded now ) you can see how the Phantom does just what you are looking for. He is loading a 256 color TGA file with all the little lemmings & his routines cut them out as required. EasyCE also has built-in sprite functions if you want them to get started. ( 256 Color format may be too low res for you )

If you have lots & lots of sprites in mind you may want to adopt an existing PC sprite editor's format or just use the tool to organise sprites then export to the TGA file. I found tile studio for PC on download.com & being free it's worth a look.
I'd suggest using a resource-only DLL and put all the stuff into it.

Regards
Fredo
Fredo,

that is a good idea, but be sure to somehow encode or otherwise protect the data files you place in the dll, especially if you hold them there as a resource, since is ts very easy to extract files fomr a resource dll.

cryo
deadsoul · 06 Jun 2002, 18:52 UTC — Rar
i use rar archives for my stuff , but then i only use EasyCE for the input and access to the framebuffer ( my version is EasyCE light :)
it was really easy to add and you can encrypt the data with a key

- deadsoul
draklava · 07 Jun 2002, 03:48 UTC — PKI
what PKI is available for PocketPC? I was also thinking digital sigs are a good way to prevent crackers from tampering with exe's