The Matrix: a useless script ...

Aug 3, 2016
When I told someone recently about me using Take Command (again) and how it can do so much more than the regular CMD.exe, he wasn't convinced. At all...

So I "had to" prove some of the powers of TCMD to him.
Tonight I had the idea to build the "raining code" from The Matrix in TCMD, as I had recently heard there was a CMD.exe version of it.
It's a few years old, but I hadn't heard of it before. That has to be my fault, because the internet is full with instructables, YouTube video's and what have you to create this amazing script!
Here is the code for the CMD version:
@echo off
color 0a
echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%
goto top

I thought I could do better :-)

So tonight I wrote a TCC version. It looks like this:

It's a pity you can't see how the text rains down the screen. It is sort of hypnotizing.
If you want to, you have to try the script for yourself (see link)...
There is room for improvement (bottom row stays white for example and I wanted to write an interactive speed control and ...), but enough is enough; it's just a demo

I hope I can convince him with this script, otherwise it is indeed a completely useless script (but fun to build!)
Here is the code. In case you have people in your "circle" like the one above ...


  • matrix.btm
    2.3 KB · Views: 121
Last edited:
May 20, 2008
Syracuse, NY, USA
That's rather tame compared to many I've written ... diffusion/aggregation and fractals. Here are a couple that are fun to write and fun to watch.

1. Let a snowflake ( a ".") start from the top center of the console. In each unit of time, it falls one pixel and randomly flutters 1 pixel right or left (or not at all). If it reaches (adjacency) the bottom of the console, or reaches the snow already piled up, it stick there. Variation: let it start at a random point at the top of the console. I first did that on a Commodore 64 and it wasn't long before the inadequacies of the machine's random number generator became (visually) obvious. For a while, the snow just piled up randomly. But after a while tree-like structures, all resembling each other, began growing out of the pile of snow.

2. You have a bowl (circle) containing particles in suspension and moving randomly (a random walk). At the center of the bowl is an "electrode" Ant particle that comes into contact with (by being adjacent to) the electrode, or into contact with the particles already aggregated at the electrode sticks there. The result is an example of a fractal.

3. This one I did recently (out of boredom). Let a point wandomly walk around the console. Put a "*" in every cell it visits. Watching it is something like an ever-changing Rorschach (ink-blot) test.
May 20, 2008
Syracuse, NY, USA
.BTMs, or it didn't happen!
At one time or another I've done all of those with BTMs (and that was in the pre-array days!) ... not pixel by pixel, but with a huge console and a tiny font. I've done them all in C/GUI, plus Julia and Mandelbrot sets. If I were to dig some old computers out of a closet I might find them. I also did Julia and Mandelbrot sets, dot by dot, with the Commodore 64 and printer escape sequences sent to a Brother dot-matrix printer. Unfortunately I no longer have the Commodore 64.

The Commodore 64 also provided by first hacking experience. I used to play a text-based game, "African Safari" (or something like that) in which I roamed around a jungle collecting goodies or having bad things happen. There was some holy grail to be found, but I could never get to it. So I dumped the TrueBasic code (the Commodore interpreted it on the fly) and figured out how to beat the system.
Aug 3, 2016
Although I realize people probably don't really care, I just wanted you to know that said guy *was* impressed. Well, as far as cynical persons ever get impressed, that is.
Anyway: one point for Take Command!

Truth to be told: he didn't get to see the previous posted version. I could not resist in some little improvements (amongst which those white lines on the bottom line ... they started to irritate me more and more).

So here it is: useless version ..2! (This forum seems to evolve into a cloud storage for my scripts ;-)


  • matrix2.btm
    3.4 KB · Views: 94
Similar threads
Thread starter Title Forum Replies Date
Joe Caverly SCRIPT and GetObject Support 3
vefatica SCRIPT ... TCC disappears Support 2
T How can I send a simple parameter to a script, in tc 25? Support 2
vefatica PSHELL: How pass arguments to script? Support 15
EDerH Powershell call from script Support 24
Joe Caverly .PS1 script does not work with PSHELL Support 11
MickeyF running program from script and (not) returning to script Support 12
T Fixed Echo randomly activated in script Support 4
fpefpe How to? script error Support 1
fpefpe How to? script error Support 0
vefatica @SCRIPT bug persists Support 4
D Catching the result of an evaluated script expression Support 0
Joe Caverly Non-conforming @Script Support 6
fpefpe How to? LUA script Support 0
T Change language in script Support 4
Steve Pitts Documentation Script errors invoking help Support 15
R How to? Launch and execute commands in tcmd.exe through MSBuild Script. Support 3
Joe Caverly @SCRIPT does not like all comments Support 2
Mordachai Help! How to set parameters for script I'm debugging?! Support 6
fpefpe How to? Script support Support 8
JohnQSmith "SCRIPT" Support 7
rconn Script kiddies on the attack Support 4
krischik Stop Script after Syntax Error. Support 6
H Ruby - Running External Ruby script crashes TCC Support 11
Joe Caverly SCRIPT Command Support 2
T Obfuscating passwords in script Support 14
Stefano Piccardi IDE.exe start toobar button fails when % in script path Support 0
lassevk exit(1) in a python script exits console, by design or bug? Support 1
R break script on syntex error Support 7
K iftp script copy deletes target files Support 17
R script problem with mapped network drive Support 1

Similar threads