News:

Welcome to RetroCoders Community

Main Menu

super simple Matrix Rain sub

Started by ron77, Aug 25, 2023, 02:48 PM

Previous topic - Next topic

ron77


here is a super simple Matrix Rain sub or function in freeBASIC...

'THIS IS A MATRIX PROGRAM, BY JOHN. W. SZCZEPANIAK
'' converted from qb to fb by ron77 2023-08-25

screenres 800, 600, 32 '12
width 800\8, 600\16

randomize

sub theMatrix()
    cls
    COLOR rgb(0, 255, 0)
    dim as long A, B, q, x
    A = 1
    B = 1
    DO
        q += 1
        IF q > 5 THEN
            q = 0
            LOCATE A, B
            PRINT CHR(x)
            A = int(RND * 36) + 1
            B = int(RND * 98) + 1
            x = int(RND * 227) + 28
            sleep 5
        end if
    LOOP UNTIL INKEY <> ""   ' = CHR(27)
        
    cls
    LOCATE 15, 30
    PRINT " THE MATRIX HAS YOU"
    sleep
end sub

theMatrix()