Skip to content

Instantly share code, notes, and snippets.

@dieppon
Created April 6, 2023 08:44
Show Gist options
  • Save dieppon/d8bb6615b7b05cf2eb31d8f654b939d0 to your computer and use it in GitHub Desktop.
Save dieppon/d8bb6615b7b05cf2eb31d8f654b939d0 to your computer and use it in GitHub Desktop.
Creates "The Matrix" rain effect in MSX BASIC
10 SCREEN 1:COLOR 12,1,1:KEY OFF:WIDTH32:A$=" THE MATRIX HAS YOU! "
20 B=BASE(6):C=16*15+0:VPOKE B+8,C:VPOKE B+9,C:VPOKE B+10,C:VPOKE B+11,C:GOSUB 100
30 LOCATE X1%,Y%:IF Y%<>11 THEN PRINT CHR$(RND(1)*221+33);:LOCATE X2%,Y%:PRINT" ";ELSE PRINTMID$(A$,X1%+1,1);
40 Y%=(Y%+1) MOD 23:IF y%=0 THEN GOSUB 100
50 GOTO 30
100 X%=0:X1%=INT(RND(1)*32):X2%=INT(RND(1)*32):RETURN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment