Suggestion: Palettes

0 favourites
  • 5 posts
  • A lot of pixel art uses specific palettes. This is partly to keep the size down, but it also allows the image's appearance to be changed on the fly later by simply modifying the palette. I was wondering if it would be feasible to incorporate indexed palettes as an option for Construct 2's Sprites and/or Tiled Background objects? This would allow users to reuse assets by simply specifying a small .pal file, or something similar, as opposed to re-importing a duplicated set of assets with a different palette added in an external image editor.

    Construct 2 already compresses images into 8-bit files if asked to, and I believe it can be done with HTML5, as shown here.

  • If you want smaller file sizes, just ensure your artwork is 256 color or less and C2 will automatically make it a palette PNG on export (blog post about it). HTML5 doesn't actually natively support palettes, I think the demo you linked to is a very cleverly prepared demo where you split the images in to red, green and blue channels and blend them with different opacities or something like that. So you can't actually switch a palette like the old 8 bit games used to, but you might already be able to fake it by preparing your images and using effects in C2.

  • Ah, I see. Well, thanks for responding.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • PixelMonkey : Ashley is right. In HTML5, images are stored as matrices, one per color (R,G,B), and Alpha. There's no concept of "indexed paletted image" (i.E. one byte value translating to one entry in the palette).

    On that demo, the coder used image from an old Amiga and then DOS code he made. Each image is sent as JSON to the browser, with an index for each pixel translating to an entry in the palette.

  • Ok then. Well, it was a nice thought. =b

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)