Author Topic: Yet Another Matrix  (Read 2721 times)

0 Members and 1 Guest are viewing this topic.

Offline bikemadness

  • Amiga 1200
  • ****
  • Posts: 322
  • Karma: 25
  • Hard players don't go home.
    • View Profile
Yet Another Matrix
« on: February 09, 2014 »
I've made other versions - this is better.

Code: [Select]
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
« Last Edit: May 31, 2015 by bikemadness »
Have a Yahappy day.
I don't know what is wrong with the world - but I know how to fix it.

Offline Galileo

  • ZX 81
  • *
  • Posts: 22
  • Karma: 0
    • View Profile
Re: Yet Another Matrix
« Reply #1 on: September 04, 2014 »
Good job. Yabasic is simple but powerfull.