Thers's only 2 bitmap castmembers in this movie. They have speciel area colors changed either by setPixel or by palette swapping. We could create new members and change their colors afterwards. This gives us huge flexibillity and faster downloads. The ink effekt was a suggestion from Barry Swan. I don't know if it's implemented the way he thought it. It's really of no use on these, but could be used on other things like eg. board games. I haven't worked with the ink effect that much, maybe theres some better way. You tell me. Al Hospers suggested the palette swapping which is fast and efficient so great thanx goes to him. It works great and leaves more work for the graphic people he he. I thought my set/getpixel idea was the only way to do it but I got wiser.
SomeOne called C.C. Chamberlin suggested this. I haven't tried it but may have a go at it sometime:
If you have access to Director 8's imaging Lingo, here's a method that produces nice results for arbitrarily-hued units, and only requires storing one 32-bit grayscale version. The idea is to create a grayscale image with an alpha channel which you can overlay a rectangular image object that has been filled with your arbitrary color. Instead of using an alpha channel to dictate where the color goes, you use the alpha information to 'cover' the custom color. Mock up your image in grayscale in Photoshop. Wherever you want the exact colors of your image (such as in the white background or black outlines), set your alpha channel to full-on, and leave the grayscale image intact. Then, in the regions you want tinted with your custom color, you will apply various degrees of alpha, and set the image to full-on black or full-on white. For instance, if you wanted a shadowed part of your image, but still respecting the custom hue, you would make the image black, with an alpha value of, say, 50%. That would darken the hue when you lay the image over it. Similarly, you can create highlight effects by making the image white and then varying the alpha level. Once you get that process down, you can further 'tint' your custom color by adding color to the image, too! For instance, you could have a custom-tinted soldier, with a hat that is slightly redder than the uniform. The process is easiest if you just have a few shades, such as full-on custom shade (0% alpha), a shadowed shade (50% black), and a highlight shade (50% white), but with channel operations, you could accurately extract the alpha for a smoothly-shaded grayscale image if you want. To render the image, duplicate the image of the icon and store a reference to it. When you need a unit of color r,g,b, just create a new image, fill it with color(r,g,b), and then copypixels the unit image onto the new image.
This method is nice for a few reasons:
* Color / bgcolor effects are somewhat unpredictable in the general case.
* Various ink effects and blend effects tend to either produce strange effects or wash out the color.
* Doesn't require you to compute a matte or a mask.
* You only need to store one graphic per unit type, and it only requires one sprite to display (if you're using individual sprites).
* Retains saturation of original color, while providing nice shadowing and highlighting effects.
* The resulting image can be used with standard background transparent ink.
* Fairly fast once you have a reference to the image stored.
* Very easy to introduce slight variations of color between units - just pass in slightly different values for r,g,b - something palette manipulations can't do.
See also User defined character change
See also The A* 1 version
See also The A* 2 version