Blending image in effect : advice needed
BlitzMax Forums/BlitzMax Beginners Area/Blending image in effect : advice needed
| ||
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. |
| ||
use SetBlend(ALPHABLEND) then SetAlpha and increment it by 0.05 or so each frame? |
| ||
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,255The variable "term", is a float that slowly moves from 0 -> 1 as the program dies. |