Jump to content
  • Advertisement


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


Performing effects on the entire screen

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

OK guys, the newbie strikes again, with yet another question... I''m working on an RPG for my project and I need to perform effects on the entire screen once battle has been commenced. Does anyone have a simple snippet of code to fade out the entire screen to black? How about fading in from black? I''ve looked anywhere for tutorials, but I just have no idea at all on how to do it in DirectX. Just a little side note: I''m using DirectX 6.0 (haha a little outdated) and the libraries of the "Tricks of the Windows Game Programming Gurus" by Andre LaMothe. I''m also using the 16 bit graphics mode. Thanx a load, ppl! - Haz -

Share this post

Link to post
Share on other sites
You will need to use Alpha blending, and since DDraw does not support it you will have to implement your own routine. In the GameDev tutorials there is a tut on Alpha blending (though it uses DDraw7 so u may have to upgrade to DX7).

Once the alpha blending routine is up and running, you will need to load a black bitmap (or create an empty surface) and alpha-blit it to the backbuffer about 60 times, incrementing the alpha opacity by 4 every frame until you reach 0xFF (255).

  Downloads:  ZeroOne Realm

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.

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!