Hi guys,
I’m having some problems porting a palette shifted animation system from J2ME to Flash.
The system is used within a game that construct characters from separate body parts for e.g. head, left arm, legs, eyes, mouth etc. These can then be tinted and animated.
Each of these body parts is coloured using a look up table. There is the original palette, then there are 18 other palettes that can be used to tint the image. This way you can configure different looking characters without having hundreds of different images. Each palette has 398 colours, there are 18 different palettes in total.
Each body part contains a small amount of colours, usually around 10-20. Colour A1, Colour B1 etc… Then the body part can be tinted using another set of colours, for eg Colour A3, B3, C3 etc… It’s simply a 2D array. (I have screenshots that help explain if needed)
Now I’ve been trying to use PaletteMap, without success. I believe it uses a full colour palette (i.e. 255 vals per colour), and can’t simply change colour A1 to colour A3 etc.
I also tried threshold, but that doesn’t seem to be fit for purpose. getPixel / setPixel is way too slow for my purpose. It needs to be pretty fast as each body part is animated.
I have a lot of flash programming experience, but never at such a low level! I would appreciate if anyone has any guidance on the subject, or has any useful examples. I might have been using paletteMap / threshold incorrectly, but the adobe docs leave a lot to be desired!
Thanks!
Anton