Author Topic: Matrix Effect by TylerDarko  (Read 333 times)

Offline The Librarian

  • Moderator
Matrix Effect by TylerDarko
« on: March 16, 2018, 07:33:50 AM »
Matrix Effect

Author: TylerDarko
Source: qb64.net Forum
URL: http://www.qb64.net/forum/index.php?topic=13656.msg122971#msg122971
Version: 2017
Tags: [ascii], [matrix]

Description:
I see your 388-lines matrix effect and raise you mine, with only 25:

Source Code:
Code: [Select]
SCREEN _NEWIMAGE(_DESKTOPWIDTH, _DESKTOPHEIGHT, 32)
_FULLSCREEN
DIM m(1 TO INT(_WIDTH / _FONTWIDTH))

FOR i = 1 TO UBOUND(m)
    m(i) = -INT(RND * _HEIGHT)
NEXT

COLOR _RGB32(0, 255, 0)

DO
    _LIMIT 15
    LINE (0, 0)-(_WIDTH, _HEIGHT), _RGBA32(0, 0, 0, 20), BF

    FOR i = 1 TO UBOUND(m)
        m(i) = m(i) + _FONTHEIGHT
        IF m(i) > 0 THEN
            IF m(i) > _HEIGHT THEN m(i) = -INT(RND * _HEIGHT)
            _PRINTSTRING (i * _FONTWIDTH - _FONTWIDTH, m(i)), CHR$(_CEIL(RND * 254))
        END IF
    NEXT

    _DISPLAY
LOOP UNTIL _KEYHIT = 27
SYSTEM

« Last Edit: August 09, 2018, 12:14:50 AM by odin »