about PNG support - and an idea
I have noticed on multiple occasions that MMF2 has problems with certain types of PNGs. It doesn't seem to support PNGs of color type 3 (index color) nor do any of the extensions, at least using MMFs file browser (says "unknown format"). The same problem applies to GIFs, too, I think (or an other format. Can't remember).
Why use indexed images? Simple: Palettes. Changing an images palette is much faster than replacing every instance of a color (hell, even age-old systems like the NES could do it!) and the latter doesn't allow for duplicate color entries.
Here's an example of what I mean:
Take this PNG
http://h1.ripway.com/MoDule/PalTest1.png
and change the data in the PLTE chunk (that's where the palette is stored) and you get this
http://h1.ripway.com/MoDule/PalTest2.png
here's a link: http://h1.ripway.com/MoDule/PalTest2.png
(probably doesn't show up right in IE. Checksum issue or something. Should work fine in image editors.) All I did was hex-edit the palette entries in the original file. Everything else is the same.
As for how this should be implemented in MMF, here's my idea:
An indexed image (like a sprite sheet) would be loaded somwhere into memory and parts of the image could then be copied to any kind of grafical object. Palette changes could be applied to the image in memory or the grafical object either by an expression to change a single palette entry or by loading an external palette file (like *.pal. It's just a sequence of bytes representing RGB values).
Alternatively, Active Objects could be made so they either use true color mode (all colors) or palette mode (using indexes). In palette mode you would have to define a palette (2 - 256 colors) and the entire object would be limited to using colors from the palette. Palette changes yada, yada woulde be done as described above.
Good idea? Bad idea? Other suggestions?
Re: about PNG support - and an idea
Very good idea! We could have colour selection in games (MMORPG?) very easily with this instead of the replace colour function :D
Re: about PNG support - and an idea
Wierd. The second image is working today?
Anyway, I'd still like to know what's up with MMF's PNG support. I can't import those two images in my first post, for example.
As for implementation, the first suggestion could be done with an extension, so it's the more likely one to get done.
I'd still like to see the other one as a key feature in a future build of MMF. Immagine doing fast palette animations in the future.
Oh, right! For anyone who's interested in learning more about the PNG format, wikipedia has a very light-weight description that's mostly easy to understand and this site here has the latest PNG specification (at least it says so).
Re: about PNG support - and an idea
Changing palettes would be nice. It should make Megaman styled games a lot easier to make. Or Fighting games when you encounter the same character you're playing as. I say this is Wish list material. :)
Re: about PNG support - and an idea
Before this gets too old,
anyone willing to add this to the wishlist may do so or show me how. Also, I might post an extension request once I work some details about how such an object would work.
Finally, I still haven't recieved an answer to my first question about MMF's current PNG support.