Ok, this is off-the-cuff, probably bad advice - but if I was going to do this right now, I`d go for two sprites with alpha - and use two sprites for each character - one for the fixed colour part, drawn first, and a white-ish one for the changeable colour part - and simply call glColor to tint the white texture to the appropriate colour.
There's probably a 'correct' way to do this manipulating colour table lookups, but this seems like a simple way of doing it. On Apr 14, 9:26 am, Trixie <[email protected]> wrote: > Hi everyone! > > I have sprites that are 8 bit (256 colors). I'd like to be able to > swap color palettes on the fly, much like many classic arcade and home > console games did. > > For example: my sprite is a girl in a blue dress. Another user selects > the same character - to tell them apart I'd like her version of the > sprite to have a pink dress. The next user that chooses the sprite > will have a green dress and so on. I'm using the same image for all of > these but since there is a limited number of colors in the image I can > just replace (the colors) that I know are the dress. Eventually, I'd > like to be able to allow the user to modify the colors on the fly to > their liking but let's just start by changing the dress pink! :) > > Has anyone had any experience with this? I would really like to learn > how to do this. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
