Matrix Digital-rain effect demo

78 views
Skip to first unread message

Clement

unread,
Mar 15, 2026, 10:56:26 AMMar 15
to The Ring Programming Language
The Matrix 'digital rain' effect was really cool, so I put together two different versions of the demo. Check them out...

  rain-v1.png
Matrix-rain-V1.ring
Matrix-rain-V2.ring

Bert Mariani

unread,
Mar 15, 2026, 12:04:03 PMMar 15
to The Ring Programming Language
Hello Clement

The 2nd one looks much simpler for the same effects.

Regards
Bert Mariani

Clement

unread,
Mar 15, 2026, 9:13:31 PMMar 15
to The Ring Programming Language
Attached files with some minor fix in the code.
Matrix-rain-V2.ring
Matrix-rain-V1.ring

Youssef Saeed

unread,
Mar 15, 2026, 10:35:37 PMMar 15
to The Ring Programming Language
Hello Clement,

Thank you for sharing!

Suggestion: It would be better to create the same example using the Ring RogueUtil extension.

Best regards,
Youssef

Azzeddine Remmal

unread,
Mar 17, 2026, 2:26:42 PMMar 17
to The Ring Programming Language
Hello Clement,  Youssef

The "Matrix Rain" effect was modified to work within the command prompt window (Console/Terminal) using the RogueUtil library instead of the raylib graphical library.

Key changes made to achieve RogueUtil compatibility:

Library replacement: Changed load "raylib.ring" to load "rogueutil.ring".
Screen dimensions: Instead of setting fixed dimensions (800x600 window), I used tcols() and display trows() to automatically adjust the command prompt size when the user zooms in/out.
Screen configuration: We used setConsoleTitle() to change the window name, hidecursor() to hide the mouse cursor, and setBackgroundColor(BLACK) with cls() to clean up the screen. Drawing Text: Replace the DrawText function with `setColor(Color)` to specify light and dark colors (e.g., WHITE, LIGHTGREEN, GREEN) and `printXY(x, y, char)` to draw at specific coordinates.

Hiding the Trace (Fade): In raylib, I used the transparent effect (Alpha layer) to fade the preceding words. At the command prompt, I calculated a trailing tail path and drew a blank space ("") at its end to hide the letters.

Program Loop: Instead of `!WindowShouldClose()`, I used `!kbhit()` to keep the display running until a key is pressed on the keyboard.

Capture111.PNG

Best regards,
Azzeddine
Matrix-rain-rogueutil.ring

Clement

unread,
Mar 17, 2026, 7:58:19 PMMar 17
to The Ring Programming Language
Nice console version. Thanks!


Regards,
Clement

Mahmoud Fayed

unread,
Mar 18, 2026, 9:26:55 AMMar 18
to The Ring Programming Language
Hello Clement

>> "The Matrix 'digital rain' effect was really cool"

Thanks for sharing :D


Greetings,
Mahmoud

Mahmoud Fayed

unread,
Mar 18, 2026, 9:30:29 AMMar 18
to The Ring Programming Language
Hello Azzeddine

>> "The "Matrix Rain" effect was modified to work within the command prompt window (Console/Terminal) using the RogueUtil library instead of the raylib graphical library."

Thanks for sharing :D


Greetings,
Mahmoud
Reply all
Reply to author
Forward
0 new messages