Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / fading!!!!!!!

Author
Message
D I G I T A L
21
Years of Service
User Offline
Joined: 22nd Jun 2003
Location: Dubai, UAE
Posted: 27th Jun 2003 00:46
i'm still having a head ache trying to figure out the fading thing.
i have some text that i need to fade in and out from a black background, and not only text but objects and an AVI movie...HOW?
thankx
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 27th Jun 2003 06:21
I found this snippet on my comp

Written by LokiDeCat
Edited by TheSnail

sync on

AWrite("Isnt this so super cool?")

function AWrite(txt$)
for x=0 to 192 step 7
ink rgb(x,x,x),0
center text 320,40,txt$
sync
next x

sleep 2000

for x=192 to 0 step -7
ink rgb(x,x,x),0
center text 320,40,txt$
sync
next x
endfunction

sync

Tested in DB Classic

RPGamer

Current Project: Eternal Destiny
Questions? Comments? Suggestions? Go to the Eternal Destiny Forum!
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 27th Jun 2003 15:57
bump so digital sees this

Current Project: Eternal Destiny
Questions? Comments? Suggestions? Go to the Eternal Destiny Forum!
Xander
22
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 27th Jun 2003 19:43 Edited at: 29th Jun 2003 03:03
You could also use the gamma fading (if your video card supports it). I use it to fade menus in and out.

set gamma 0,0,0

Load your stuff onto the screen

To fade in:
for a=0 to 255 step 8
set gamma a,a,a
next a

Do your menu stuff

To fade back out:
for a=255 to 0 step -8
set gamma a,a,a
next a

Xander
Bolt of Bolt Software Productions
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 28th Jun 2003 03:51
bump again......

Current Project: Eternal Destiny
Questions? Comments? Suggestions? Go to the Eternal Destiny Forum!
Mattman
21
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 28th Jun 2003 04:13
rpgamer, you are very naughty!!!

---Mattman
"Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done." Andy Rooney
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 28th Jun 2003 06:40
Why am I naughty I gave the guy some code Im making sure he gets it...thats being helpful.

RPGamer

Current Project: Eternal Destiny
Questions? Comments? Suggestions? Go to the Eternal Destiny Forum!

Login to post a reply

Server time is: 2025-05-19 03:55:28
Your offset time is: 2025-05-19 03:55:28