Re: [Gamedevlists-brew] porting a database file from BREW to J2ME
Brought to you by:
vexxed72
|
From: David P. <da...@ma...> - 2004-12-13 19:17:32
|
What i usually do in my java games, is to split up the big resources (>80kb)
into small ones, ~20kb each. Therefore i dont end up having too many files
(which would increase the jar/zip header), and it also reduces the memory
overhead when opening the filestream. Never had to use any compression algo,
appart for rle8/16 for some maps..
----- Original Message -----
From: "Tom Park" <bre...@ac...>
To: <gam...@li...>
Sent: Sunday, December 12, 2004 2:09 AM
Subject: Re: [Gamedevlists-brew] porting a database file from BREW to J2ME
>> Is there sneaky way to use the built-in zip decompressor that is required
>> for decompressing the jar and png files? I was thinking of putting the
>> data
>> in a fake PNG 24-bit image, but I don't see a way to read it. It would
>> be a
>> shame to have to bring along a ZIP decompressor in my jar, just because
>> they
>> didn't expose it in the MIDP API.
>
> Oh, have you not tried this method?
>
> InputConnection conn = Connector.open("jar:/dictionary.jar",
> Connector.READ);
> DataInputStream dis = conn.openDataInputStream();
>
> Just kidding. It's annoying that they didn't expose an
> inflate in MIDP2. They did add Image.getRGB, but that
> still doesn't help because the values can be altered
> to phone-safe colors.
>
> You said you already have a decompressor, but you might
> be interested in looking at this one:
> http://www.java4ever.com/index.php?section=j2me&project=apime&menu=download&lang=en
>
>> Given that some phones decompress the application at install time, as Tom
>> P
>> explains, it seems that I can't rely on the zip compression in the jar
>> file
>> alone.
>
> Well, you could make a separate version for iDEN phones.
> --t
>
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://productguide.itmanagersjournal.com/
> _______________________________________________
> Gamedevlists-brew mailing list
> Gam...@li...
> https://lists.sourceforge.net/lists/listinfo/gamedevlists-brew
>
|