Hello,

I'm writing a game for a computer class that I'm currently taking for
school. The game has a lot of graphics associated with it (mostly
in .png format). There is too much data to simply include it as part
of the 'res'. The way i'm currently doing it, is to store all of the
graphics in a single zip file, in a folder on the SDCard, e.g., /
sdcard/Game/PlayerImages.zip (or whatever). And then i'm using the
ZipInputStream to read from those, then using the BitmapFactory to
decode the stream and then draw them on the canvas. The problem that
I'm having is that this method is terribly slow if I add a lot of
images into the zip file. The best way I have found thus far is to
name the .png files within the zip numerically, then use a for-loop to
jump directly to a specific file, but this is still a very slow way of
doing it. I would like to use a single file (like zip) to hold all of
the files for several reasons. 1., i'm trying to use a file container
so i can simply update graphic 4.png and then push it into the zip
file (for example) from a server. 2., because android sees all image
files on the sdcard when you open the gallery application. 3., easier
to prevent data manipulation by doing an md5/sha-1 checksum on 1 zip
file, rather than every time a file is opened if it weren't in a
container.

If anyone has any advice or suggestions for how to accomplish what I'm
looking for, or can at least point me in the correct direction, I
would greatly appreciate it.

Thanks,
Ryan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to