If you like the matrix, and have some spare time, you could make an endless program, that shows random numbers, as fast as the computer can run it, looking very similar to the matrix! It only takes about 5 minutes to prepare!

I was having a look around the Instructables site, and saw some Matrix screen makers.
I like writing computer programs, and one time decided to make one of these, and I am going to show you how!

You must have the Microsoft .NET Framework 3.5 installed to do this.

Please rate, it is my first instructable, and I want to know how I go.

If you do not have the Microsoft.NET Framework 3.5, you can easily download it from the Microsoft Download site (download.microsoft.com), and search for .NET 3.5.

I have made a new version that spits out random characters, instead of just numbers.

It DOES NOT show a screenshot of the matrix, or show a 3D screen. Just random letters. In green.

Step 1: Coding

You need to download the code file attached, and save it in to your my documents folder. If you are interested in computer programming, this program might be interesting to look at. You need to copy all of the italic text, and save it to a file called Program.txt.

using System; namespace Matrix_V2 { class Program { static void Main(string[] args) {
//Sets the text color to green
Console.ForegroundColor = ConsoleColor.Green;
//Create a string with some random characters
string random_characters = "£¤¥¦§¨©ª«¬®¯±²³´µ¶·¸¹ºΣΤΦΩαβδεμπστφABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz<,>.?/:;\"\'{[}]\\|`~0123456790-_=+!@#$%^&*() ";
//Get all of those characters and turn them into an "array"
char[] random_characters_array = random_characters.ToCharArray();
//Clear the screen Console.Clear();
//Writes details about the application to the console screen
Console.Title = "Matrix V2 - Press Ctrl+C to exit";
Console.WriteLine("Matrix V2");
Console.WriteLine("Written by Chris Ward");
Console.Write("Press any key to continue");
//Creates a pseudo-random generator
Random r = new Random();
//Creates a statement that runs forever
while (true) {
//Gets the ASCII character from the array, based on what the number is
//then runs the statement again... and again... etc.
} } } }

I copied the code and removed the space before \csc.exe and it ran very nicely. thanx for the matrix code, much more realistic than simply using the random number code.
<p>so i have to have the frame work in order for this to work, and i really dont want just random as letters and numbers, does it look exactly like it in the picture?</p>
It doesnt look exactly like in the picture, what you are describing seems to be correct. I am currently working on a version that is more similar to the picture, but i cant make it in 3d, no idea how, lol. I will upload a new picture soon.
<p>My batch file won't change into a exe file. Is this because I have microsoft.net framework 4.5?</p>
All this software users! Modifications of my version:<br> #no data and keypress, fast running<br> #maker error fixes(like spaces)<br> # link: <a href="http://db.tt/dHe2ynu9" rel="nofollow">http://db.tt/dHe2ynu9</a><br> Than you!
Not sure what you mean by it's fast running, it's all about the speed of the computer. If anything you'd want to slow it down so it doesn't chew up too much CPU. And what do you mean error fixes? I didn't realise there were any errors. I pulled your source and can't find any error handling
i meaned errors in maker(look up!):P Like spaces! <br>I removed author data and &quot;press enter&quot; to start
Well it is actually against the licence that the code is released under to remove that line and not attribute in any other form, just add a comment or something around the top saying it's derived from my source
Can you tell me where is the place of the code &quot;Press Ctrl+C to exit&quot;? I want to change the combination key &quot;Ctrl+C&quot; to another key. Thank
(Sorry for the late response) Ctrl+C is a standard key in Windows and other operating systems which simply kills the program where it is. In my code, I haven't actually got it listening for Ctrl+C, but I'm letting Windows kill the process when it is pressed. In short, Ctrl+C can't be changed without adding a lot more code.
Please help <br>it runs, closes just like its supposed to. but no file is created. HELPPPP
Please read the troubleshooting section at the bottom of the Running page.
Oh and @pause
@Tecnodancer, I put &quot;@echo off&quot; at the end, but still no .Exe file... Please help, I really want this to work. I've also tried deleting spaces, but i don't know witch ones to delete. What am I doing wrong?
when i run it it just says<br> The directory name is invalid.<br>Press any key to continue . . .<br>HELPP
wat does the Matrix.EXE file even look like??
even know i removed the space, it did not make the Matrix.EXE file.
Open the .bat file in notepad and add the line &quot;@pause&quot; to the end of the file on a new line. Run the bat again and post here what it says. Thanks
When i run the batch file it quickly opens and closes <br><br><br>Help<br>
I have the same problem as T8tersaild.
Could you possibly upload the file
With the bat file should open and close really quickly. After running the batch file, a .exe file should now appear in the folder where you ran the .bat file. If there is none, please reply.
When I click on the program folder, it just opens notebook. How should I get it to open in command prompt?
Open command prompt Start &gt; Run &gt; cmd<br> Type cd <em>Location of files</em><br> Press enter<br> copy the line for the compiler, the really long one.&nbsp;
Hmm still doesn't work, when i click on the .bat file, another command prompt window just opens really quickly and closes really quickly.
does it work in my Win7?
it should, however I have not tested it.
<p>when&nbsp;I run the program a window opens (windows\sistem32.cmd.exe) and is says press any ket to continue . . . and if I press any thing it just closes. What is posibly the problem?<br /> &nbsp;</p>
It keeps saying it can't find the file, but its in the same folder as the batch file and it's called 'Program.txt' just like the instructions say. Can you help?<br />
I am not sure of the problem you are having. Do you have the framework installed (to check just go to the 'C:\WINDOWS\Microsoft.NET\Framework' folder and see if the v3.5 folder exists
please help<br /> <br /> error<br /> <br /> warning CS1691: '1702/errorreporting:prompt' is not a valid warning numer<br /> <br /> Thank you Michael Fitzgerald<br /> <br /> Note: Currently Running Windows Vista Home Premuim<br />
Hi, it seems that there was a problem in the bat file, which is caused by the copying, simply just add a space where the&nbsp;(*) is <br /> <br /> <em>&nbsp;&nbsp;&nbsp; /nowarn:1701,1702<strong>(*)</strong>/errorreport:prompt</em>
<em>When I run the batch it gives me this:<br /> <br /> Program.txt(23,8):error CS0116: A namespace does not directly contain members such as feilds or methods<br /> <br /> Program.txt(23,42):error&nbsp; CS1022: Type of namespace definition, or end-of-the-file expected<br /> <br /> Can you help at all?<br /> </em>
&nbsp;I ran the code myself, and it worked just fine. If you copied the code, maybe you should try downloading the code, I don't have any idea why it shouldn't work... wierd...
&nbsp;awesome, dude, it worked!!!!!!!!!!
&nbsp;it doesnt work, when i click on the batch file, it says, that its unrecognizagble or somehtin
&nbsp;can you please tell me exactly what it says?
&nbsp;It says that &quot;not recognized as an internal or external command, operable program or batch file.
&nbsp;OK. I will post it up on the troubleshooting page (last one) if that still doesn't help, please reply here again.<br /> <br /> <br /> <br />
could you upload the MATRIX.bat file becuase when troubleshooted it just made a huge green screen on CMD
If it is when you start the &quot;matrix.exe&quot; program, it should show a screen with detail on the application. Then you need to press any key. It should then start&nbsp; writing random characters to the screen. This program doesnt eventually show an image of the matrix, it merely writes random stuff to the screen.&nbsp;If you get the green screen while running the batch file, let me know.
The intro is a nice eye-catcher, but spewing out some random numbers doesn't make a matrix theme. If you know how to use the right characters, please share, I'd love to know.<br />
I could change the code a bit to spit out an ascii character based on which number it is, but that would make the code confusing, and very large, is that what you meant?
Of course ascii, that could be a good alternative. I was too focused on those Japanese looking glyphs.<br /> Thanks<br />
with it being command line, I would&nbsp;use other things, but you would need to install lots of other language packs and mumbo jumbo. I will work on the new code, and put it up here asap.
Do you think i should explain the code in comments in the code file itself?
Whatever you find easiest. Personally I'd go with comments, unless you'd want to write it in an instructable.<br />

About This Instructable


13 favorites


Bio: I love writing computer programs and pulling stuff apart to "see how it works", then putting it back together again.
More by chrisgward: Interfacing your arduino with a C# program Make a Matrix Screen with Pseudo-Random number generator
Add instructable to: