Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.

Sprites using "significant" colours

This topic is 6040 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

When boiled down, sprites are patterns of pixels(lets say I am making a 256 colour game ie each pixel is represented by a byte). When making sprites for characters, I want to use the same units for different characters, and I want to see the background beside them. eg in Warcraft 2, units for 2 orc players; in AOE, units for 2 egyptian players; etc The armour for grunts in wc2 or clothes of villiagers in aoe, is a different colour depending on which player controls the unit, however the rest of the body stays the same(no yellow heads ). If I were doing this, I imagine I would set aside two colours(say 254, 255). One would be "clear" ie when copying the pixels from the bitmap onto the screen, pixels of value 254 would be skipped, in effect letting you "see through" the sprite to graphics already drawn. The other would be "PlayerColour" ie the pixels of value 255 would be drawn in as the colour representing the player controlling the unit. I am sure this has been thought of before, since it is a simple logical idea, so what advice can you give me? eg colours to avoid using, ... Also, I was wondering if there are any different methods you know of? You don''t need to give me a vade mechum, just tell me what it is called, and I''ll find out about it myself. Thanks a heap. "Of all the things I''ve lost, I miss my mind the most." Goober

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!