Dark Bit Factory & Gravity
PROGRAMMING => Other languages => Yabasic => Topic started by: bikemadness on February 09, 2014
-
I've made other versions - this is better.
open window 640,512
mx=50
my=42
dim scr(mx,my)
for y=0 to my
for x=0 to mx
scr(x,y)=int(ran(96)+33)
next x
next y
ms=40
dim sx(ms)
dim sy(ms)
for a=1 to ms
sx(a)=int(ran(mx))
sy(a)=int(ran(my))
next a
repeat
setdispbuf vm
vm=1-vm
setdrawbuf vm
for s=1 to ms
x=sx(s)
y=sy(s)
setrgb 1,0,255,0
gosub letter
y=y-1
setrgb 1,0,200,0
gosub letter
y=y-1
setrgb 1,0,150,0
gosub letter
y=y-1
setrgb 1,0,0,0
fill rect x*12.8-1,y*12.8+4 to x*12.8+12,y*12.8-10
setrgb 1,0,70,0
gosub letter
y=y-24
setrgb 1,0,0,0
fill rect x*12.8-1,y*12.8+4 to x*12.8+12,y*12.8-10
next s
for s=1 to ms
if int(ran(5)+1)=1 sy(s)=sy(s)+1
if sy(s)>my+25 then
sy(s)=0
sx(s)=int(ran(mx))
fi
next s
until (1=0)
label letter
if y<0 or y>my return
c=scr(x,y)
text x*12.8,y*12.8,chr$(c)
return
-
Good job. Yabasic is simple but powerfull.