How can you implement multiple color pallets?

General

NeoTechni

6 months ago

ie: Draw an indexed-color picture in RGB mode, but select which color pallet to use rather than use the 1.

That way you could draw pallet-swapped enemies using a single image.

eriban

NEW 6 months ago

I recently had the same question myself, and received a question in the Images discussion. You can change the palette before drawing using gb.display.colorIndex

In my own game I am now useng it for drawing the player and enemies using the same image: Movers.cpp#L224

This uses custom palettes which I defined here: Palettes.cpp

NeoTechni

6 months ago

That's actually an easy solution, thank you.

Aurélien Rodot

NEW 6 months ago

I just opened a ticket about this question >>> https://github.com/Gamebuino/Gamebuino-META/issues/27

NeoTechni

NEW 6 months ago

eriban eriban

That's actually an easy solution, thank you.

You must be logged in in order to post a message on the forum

Log in