3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Make a Matrix Screen with Pseudo-Random number generator

Make a Matrix Screen with Pseudo-Random number generator
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.

**UPDATE**
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.
 
Remove these adsRemove these ads by Signing Up
 

Step 1Coding

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.WriteLine("http://www.instructables.com/member/7654321chris");
Console.Write("Press any key to continue");
Console.ReadKey();
//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
Console.Write(random_characters_array[r.Next(random_characters.Length)]);
//then runs the statement again... and again... etc.
} } } }


« Previous StepDownload PDFView All StepsNext Step »
47 comments
1-40 of 47next »
Feb 12, 2010. 8:57 AMkahlehl says:

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?

Jun 6, 2010. 7:32 PMNightCrawler626 says:
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.
Apr 29, 2012. 8:28 AMmikroskeem says:
All this software users! Modifications of my version:
#no data and keypress, fast running
#maker error fixes(like spaces)
# link: http://db.tt/dHe2ynu9
Than you!
May 9, 2012. 4:53 AMmikroskeem says:
i meaned errors in maker(look up!):P Like spaces!
I removed author data and "press enter" to start
Jul 16, 2011. 10:03 PMskypeaful says:
Can you tell me where is the place of the code "Press Ctrl+C to exit"? I want to change the combination key "Ctrl+C" to another key. Thank
Sep 25, 2011. 7:18 AMswolff says:
Please help
it runs, closes just like its supposed to. but no file is created. HELPPPP
Sep 29, 2011. 7:08 PMswolff says:
Oh and @pause
Sep 29, 2011. 6:50 PMswolff says:
@Tecnodancer, I put "@echo off" 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?
Sep 25, 2011. 7:49 AMswolff says:
when i run it it just says
The directory name is invalid.
Press any key to continue . . .
HELPP
Jun 4, 2011. 8:00 PMfabsy333 says:
wat does the Matrix.EXE file even look like??
Apr 21, 2011. 10:48 PMfabsy333 says:
No .EXE
Apr 15, 2011. 3:11 AMfabsy333 says:
even know i removed the space, it did not make the Matrix.EXE file.
Feb 26, 2011. 10:14 PMlifeiserty says:
When i run the batch file it quickly opens and closes


Help
Sep 22, 2010. 6:17 PMSLAYERab says:
I have the same problem as T8tersaild.
Sep 22, 2010. 6:31 PMSLAYERab says:
Could you possibly upload the file
May 14, 2010. 4:43 PMT8tersalid says:
When I click on the program folder, it just opens notebook. How should I get it to open in command prompt?
Aug 7, 2010. 1:09 PMT8tersalid says:
Hmm still doesn't work, when i click on the .bat file, another command prompt window just opens really quickly and closes really quickly.
Aug 7, 2010. 12:58 AMbigZ_ says:
does it work in my Win7?
May 29, 2010. 10:13 AMG.J. Dyason says:

when 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?
 

Apr 27, 2010. 6:37 PMtechnoguy94 says:
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?
Feb 26, 2010. 12:25 AMfreddieboy4883 says:
please help

error

warning CS1691: '1702/errorreporting:prompt' is not a valid warning numer

Thank you Michael Fitzgerald

Note: Currently Running Windows Vista Home Premuim
Jan 5, 2010. 7:47 AMmichaelhaseth says:
When I run the batch it gives me this:

Program.txt(23,8):error CS0116: A namespace does not directly contain members such as feilds or methods

Program.txt(23,42):error  CS1022: Type of namespace definition, or end-of-the-file expected

Can you help at all?
Jan 2, 2010. 7:38 PMandrewthach says:
 awesome, dude, it worked!!!!!!!!!!
Jan 1, 2010. 12:18 PMandrewthach says:
 it doesnt work, when i click on the batch file, it says, that its unrecognizagble or somehtin
Jan 2, 2010. 12:06 PMandrewthach says:
 It says that "not recognized as an internal or external command, operable program or batch file.
Dec 21, 2009. 1:27 PMyout says:
could you upload the MATRIX.bat file becuase when troubleshooted it just made a huge green screen on CMD
1-40 of 47next »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
4
Followers
2
Author:Techno Dancer(My site)
I love writing computer programs and pulling stuff apart to "see how it works", then putting it back together again.