09-21-2016, 06:40 AM
(09-21-2016, 06:07 AM)puggsoy Wrote: This is how game developers do it.
Maybe I'm going off topic here, but this sentence has interesting implications.
I mean, you're exactly right. That's how game developers do it. But game developers also not only re-use sprites with different palettes, they also re-use tiles with different attributes. Hell, backgrounds and levels are simply different tiles with different palettes and attributes re-used. Superfluous palettes are obviously annoying, but technically, aren't superfluous tiles too?
PNG in itself does nothing to solve the problem, because for image parsers, PNGs are just a huge array of pixels (and a CLUT in 8-bit PNGs, sure).
There's no all-around solution for the problem, but if we had a universal SPRITE file format, that, unlike a PNG which only defines image width, height, a color lookup table and content, takes into account the bit depth of tiles, their arrangement in the X/Y plane, their flip/priority attributes, sprite origin, palettes and all that jazz, we would not only save tremendous amounts of space, but also standardise all NES/GB/Genesis/SNES/whatever sprites to a common format that offers insight for ROM hackers and animators, easy editing and easy palette swapping.
Of course there's no support for such thing yet, but aseprite comes close with its format.