xna drawing question

Started by
1 comment, last by XXChester 12 years, 10 months ago
I'm building a top down shooter and i want to make the screen flash a color of tint when you are hit. What would be a way of achieving this mechanic?
Advertisement

I'm building a top down shooter and i want to make the screen flash a color of tint when you are hit. What would be a way of achieving this mechanic?


Probably the easiest way to do this would be to draw a partially transparent full screen sprite (with SpriteBatch). You can animate the alpha value over time in code to make it gradually fade it and then back out.


A pixel shader should be able to achieve this effect for you.

Remember to mark someones post as helpful if you found it so.

Journal:

http://www.gamedev.net/blog/908-xxchesters-blog/

Portfolio:

http://www.BrandonMcCulligh.ca

Company:

www.gwnp.ca

This topic is closed to new replies.

Advertisement