Lemmini - Lemmings for Java - public Alpha

Started by 0xdeadbeef, February 21, 2006, 06:37:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

0xdeadbeef

Damn, this forum is so slow :(

Anyway, Fallers fall at 3 pixels per frame, floaters at 2 pixels per frame.
Pixels here are hires pixel with 1 lores pixel = 2 hires pixels.
To compensate for the higher resolution, Lemmini runs at 30ms/frame instead of 60ms/frame.
I did some (rough) visual comparison with the PAL Amiga version which looked ok for me.

Regarding Mac issues: the problem is the palette index. Problem is that when I extract the pictures to GIFs, some pictures need the palette at offset 0 and others need it at offset 0x80. So I just copy the palette to both offsets which I supposed to be a "quick'n'dirty" solution at the time. However it would have been more clever to patch the indices in the image data to always use the "low" palette.
The problem is that on the Mac, for some reason, when creating the GIF, "automagically" only the low indices are used, while on Win/Linux, the indices are not altered (so some are low, some are high).
I first thought that a API function called "PixelGrabber" would behave differently by detecting double entries or whatever. This theory proved wrong unfortunately, though it seemed to be the most logical explanation. Indeed I wrote my own cheap Pixelgrabber-Code, but the result was the same.
Now obviously the BufferedImage-Class itself is implemented differently on the Mac and I can't simply recreate it or modify its behavior.
Solution is to adapt the Linux/Win-Versions to the behavior on the Mac: I will now patch the indices of the pixel data to always use the low data - so the outcome should be the same as now on the Mac. Unfortunately I patched quite a lot of pictures which I use as reference for creating the patches - which I use to create the wanted resources from the extracted resources. This means I have to patch all of my changed "reference" pictures to low indexed palettes which would be too much work to do manually. So I have to write myself a tool for this, which will delay the fix a little.
Still I hope this issue will be fixed next week. The upcoming weekend is a "long weekend" in Germany, since Monday is a holiday. Let's just hope I manage to stop playing around with my new GPS-PocketPC (great toy) and write that bloody palette patcher ;)

0xdeadbeef

Ok, thanks to the long weekend and Andrew's (LU Admin's) testing efforts, Lemmini should finally work on the Mac. Well, gameplay obviously worked before, but not the extraction.

Fixes/changes 0.73 -> 0.73
# Fixed bug that hindered Lemmini from loading custom styles from the "styles" folder
# Changed GIF extraction routine to work around bugs in the Mac JVM: in indexed color mode
  the MAC JVM doesn't use the correct indices when creating a BufferedImage from a pixel buffer
  and an IndexColorModel. Firstly, it always selects the lowest possible index for colors that appear
  multiple times in the palette. Secondly, sometimes wrong indices with similar colors are used.

Mindless

Instead of saying "You finished level <insert rating name here>" could the congrats message say something like "You finished all the <insert rating name here> levels."?

0xdeadbeef

Should be no issue. I think I'll change that in the next update...