Jump to content
  • Advertisement
Sign in to follow this  
ahayweh

Allegro 24/32-bit palette swapping...

This topic is 3807 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

So I am working on my game , and I want to have damage effects where a sprite's palette switches temporarily , and then reverts back to it's original. I am working with Allegro , and the palette routines are mostly for 8-bit ( get_color/set_color ). Any ideas? [Edited by - ahayweh on March 18, 2008 12:25:05 AM]

Share this post


Link to post
Share on other sites
Advertisement
True palette animation is only available in palette-based video modes, i.e. it isn't.

You can compute all recolored sprite variants from your palettes in advance, either when you load the game (as bitmaps matching the video mode) or offline (to files, like the standard sprites).

If you have separate sprites nothing stops you from drawing something nicer than a rigid recoloring (for example an hurt character can make some gesture to express his pain) or from using overlays or transparence effects.

Share this post


Link to post
Share on other sites
k thanks. The precalc method is probably what I am going to be using. What do you mean by an overlay?

Share this post


Link to post
Share on other sites
Quote:
Original post by ahayweh
k thanks. The precalc method is probably what I am going to be using. What do you mean by an overlay?

An addition to the normal sprite, to be drawn on top of it or instead of a normal section. For example, a person being hit can be drawn with a special head (flinching, spitting blood etc.) but with the usual body.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!