Pallete and on the fly coloring
Displaying 1-3 of 3 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Glenshope

So I want to set up a color pallet system. IE, I have one image but I can use a color pallet to alter the different colors of the different areas, something like what they did in Ragnarok Online. So basically no matter what color you choose you will come up with that color on that item or hair or whatever you are trying to change.

Just wondering how this works, the basics behind how it is done and the possibility of doing something similar in Verge.

Posted on 2008-02-09 13:42:37

Kildorf

The best way to do this would probably be with ColorReplace() [ see documentation ]. You can use ColorReplace to change one specific colour to another in an image. This means you won't have to maintain a specific pallette, you can just draw all your character pieces in one colour and then replace each of the shades you use on the fly.

This'll probably be pretty slow if you try to do it every frame, so I suggest saving an image of the pallette-swapped item and just blitting that each time the entity is drawn.

Does that make sense?

Posted on 2008-02-09 16:39:17 (last edited on 2008-02-09 16:39:57)

Glenshope

Yeah that could definitely work, thanks.

Posted on 2008-02-11 03:14:07


Displaying 1-3 of 3 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.