Blending image in effect : advice needed

BlitzMax Forums/BlitzMax Beginners Area/Blending image in effect : advice needed

DannyD(Posted 2005) [#1]
Hi,
Thanks to everyone who has offered help and advice so far.I'm back with another question.

I'd like to "blend" an image in.Imagine a white background and the image appearing on the screen gradually, perhaps in 1 or 2 seconds.Alot of games have intros like this where the logo blends into the screen. Any tips on how to achieve this effect ? Thanks in advance.


Perturbatio(Posted 2005) [#2]
use SetBlend(ALPHABLEND) then SetAlpha and increment it by 0.05 or so each frame?


FlameDuck(Posted 2005) [#3]
Yeah. Look at the sample "oldskool2" for one way to acheive an effect like this (although it fades to black, but changing it to white is really pretty much a no-brainer).

The relevant code is reproduced below:
SetBlend ALPHABLEND
SetAlpha term
SetColor 0,0,0
DrawRect 0,0,640,480
SetAlpha 1
SetColor 255,255,255
The variable "term", is a float that slowly moves from 0 -> 1 as the program dies.