Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

The Matrix: a useless script ...

Aug
376
9
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:
Code:
@echo off
color 0a
:TOP
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:
Capture.JPG


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 ...
 

Attachments

  • matrix.btm
    2.3 KB · Views: 345
Last edited:
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.
 
That's rather tame compared to many I've written ... diffusion/aggregation and fractals.

You are probably right, but this specific "audience" would certainly not grasp the complexity of that.

(And I better not tell him how much CPU this matrix-script uses ....)
 
.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.
 
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 ;-)
 

Attachments

  • matrix2.btm
    3.4 KB · Views: 313

Similar threads

Back
Top