Jump to content
  • Advertisement
Sign in to follow this  
amannis

Making sprite white on impact

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

Hello, I'm doing a 2D space shooter and I'm drawing my sprites as 2D-quads (with alpha transparency). I want the sprites to go completely white when they get hit. I tried to search old posts but no luck. I guess there's a very simple solution to this? ps. I know I should read the red book...

Share this post


Link to post
Share on other sites
Advertisement
heh, your not giving us much information. What programming langauge, and what libraries are you using?

edit: ah, I just noticed this is in the opengl forum, I assume it's opengl

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
when loading the sprites images at startup you could create a fully white version of each (or a specific frame depending on how accurate you want it) frame. (loop through all pixels retain alpha and set colour values to white)

then just switch to that when you want it to be white.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!