Dark Bit Factory & Gravity

PROGRAMMING => Other languages => Yabasic => Topic started by: bikemadness on July 27, 2011

Title: word string fade - emulation
Post by: bikemadness on July 27, 2011
I liked the effect of the welcome note on the home page so much, I've tried to emulate it.
I know there'll be a better approach than the method I came up with,
but I achieved my goal.

Code: [Select]
open window 640,512
go=1
go1=1:m1=1
go2=1:m2=1
go3=1:m3=1
go4=1:m4=1
go5=1:m5=1
go6=1:m6=1
go7=1:m7=1
go8=1:m8=1
go9=1:m9=1
go10=1:m10=1
go11=1:m11=1
go12=1:m12=1
go13=1:m13=1
repeat
setdrawbuf vm
vm=1-vm
setdispbuf vm
clear window
setrgb 1,250,250,0
fill rectangle 0,0 to 640,512
goa=goa+1
if goa>3 goa=1
if goa=3 go=go+1
if go>200 go=1
if go>01 and go<20 then
go1=go1+m1
if go1>30 m1=-m1
if go1=0 m1=1
setrgb 1,250-(go1*8),250-(go1*8),0
text 200,250,"watch this space"
endif
setrgb 1,0,0,0
if go>15 and go<35 then
go2=go2+m2
if go2>30 m2=-m2
if go2=0 m2=1
setrgb 1,250-(go2*8),250-(go2*8),0
text 200,250,"here it comes"
endif
if go>30 and go<50 then
go3=go3+m3
if go3>30 m3=-m3
if go3=0 m3=1
setrgb 1,250-(go3*8),250-(go3*8),0
text 200,250,"any moment now"
endif
if go>45 and go<65 then
go4=go4+m4
if go4>30 m4=-m4
if go4=0 m4=1
setrgb 1,250-(go4*8),250-(go4*8),0
text 200,250,"still waiting?"
endif
if go>60 and go<80 then
go5=go5+m5
if go5>30 m5=-m5
if go5=0 m5=1
setrgb 1,250-(go5*8),250-(go5*8),0
text 200,250,"should be soon"
endif
if go>75 and go<95 then
go6=go6+m6
if go6>30 m6=-m6
if go6=0 m6=1
setrgb 1,250-(go6*8),250-(go6*8),0
text 200,250,"won't be long"
endif
if go>90 and go<110 then
go7=go7+m7
if go7>30 m7=-m7
if go7=0 m7=1
setrgb 1,250-(go7*8),250-(go7*8),0
text 200,250,"nearly there.."
endif
if go>105 and go<125 then
go8=go8+m8
if go8>30 m8=-m8
if go8=0 m8=1
setrgb 1,250-(go8*8),250-(go8*8),0
text 200,250,"did you see it?"
endif
if go>120 and go<140 then
go9=go9+m9
if go9>30 m9=-m9
if go9=0 m9=1
setrgb 1,250-(go9*8),250-(go9*8),0
text 200,250,"what you mean,"
endif
if go>135 and go<155 then
go10=go10+m10
if go10>30 m10=-m10
if go10=0 m10=1
setrgb 1,250-(go10*8),250-(go10*8),0
text 200,250,"you didn't see it"
endif
if go>150 and go<170 then
go11=go11+m11
if go11>30 m11=-m11
if go11=0 m11=1
setrgb 1,250-(go11*8),250-(go11*8),0
text 200,250,"I'll do it again"
endif
if go>165 and go<185 then
go12=go12+m12
if go12>30 m12=-m12
if go12=0 m12=1
setrgb 1,250-(go12*8),250-(go12*8),0
text 200,250,"what about that time"
endif
if go>180 and go<200 then
go13=go13+m13
if go13>30 m13=-m13
if go13=0 m13=1
setrgb 1,250-(go13*8),250-(go13*8),0
text 200,250,"let's start over"
endif
until (1=0)

long-winded and repetitive. that's me.
Title: Re: word string fade - emulation
Post by: rain_storm on July 27, 2011
Neat.
Title: Re: word string fade - emulation
Post by: slinks on August 16, 2011
I like!  :D