News:

Welcome to RetroCoders Community

Main Menu

GW Basic - Matrix Rain by BlackJack

Started by ron77, Nov 21, 2023, 06:08 AM

Previous topic - Next topic

ron77

10 ON TIMER(25) GOSUB 160: TIMER ON
20 DEFINT A-Z:RANDOMIZE TIMER:DEF SEG=&HB800
30 DIM MMI(80),MROW(80,5),MMODE(80,5)
40 DEF FNG(N)=N-(INT(20*RND)+5)
50 ' Initialize.
60 FOR I=0 TO 1999:POKE I*2+1,0:POKE I*2,INT(256*RND):NEXT
70 FOR COL=0 TO 79:R=0:MODE=-1
80 FOR I=1 TO 5:R=FNG(R):MROW(COL,I)=R:MODE=NOT MODE:MMODE(COL,I)=MODE:NEXT
90 MMI(COL)=5:NEXT
100 ' Main loop.
110 WHILE INKEY$="":FOR COL=0 TO 79
120 FOR I=1 TO 5:R=MROW(COL,I):R=R+1:MROW(COL,I)=R:IF R<0 THEN 150
130 A=(R*80+COL)*2+1:IF MMODE(COL,I) THEN POKE A,0:GOTO 140:ELSE POKE A,10:IF R THEN POKE A-160,2
140 IF R=25 THEN J=MMI(COL):MMODE(COL,I)=NOT MMODE(COL,J):MROW(COL,I)=FNG(MROW(COL,J)):MMI(COL)=I
150 NEXT:NEXT:WEND
160 REM TME:
170 CLS: COLOR 2
180 WHILE INKEY$ <> CHR$(27)
190 LOCATE 15, 30
200 PRINT " THE MATRIX HAS YOU"
210 WEND
220 END


johnno56

Curious... What function do the "pokes" provide?
May your journey be free of incident.  Live long and prosper.