Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MATRIX screen saver 4

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
have you seen the movie the matrix? if you have maybe you can help me. You know when there are all of those zero's and one's in green writing going all over the screen? thats what i want the screen saver to look like.

When the sreen saver stops I want the words: "THE MATRIX HAS YOU"
blinking on the screen.

please help me, this would be a realy cool screen saver.

thanks
 
Check out the previous post below:

thread314-33506 answers are right there.

--MiggyD
 
thanks for the tip, but...
how do I get the zero's and ones to scramble randomly all over the place.

that post only helps for "THE MATRIX HAS YOU"
 
I couldn't resist. Try this....
[tt]
CLS
DO WHILE INKEY$ = ""
RANDOMIZE TIMER
R = INT(RND * 25) + 1
C = INT(RND * 80) + 1
ZeroOrOne = INT(RND * 2)
LOCATE R, C
PRINT LTRIM$(STR$(ZeroOrOne));
LOOP
CLS
LOCATE 12, 31
PRINT "The Matrix Has You";
[/tt]
VCA.gif

Alt255@Vorpalcom.Intranets.com
 
Sorry I don't know what you are envisioning here.. If you wanted it to look real good you would need to use graphic 1s and 0s or some kind of different font.

I remember that part of the movie but I'm not sure quite what it looked like. I can't remember if the bits scrolled vertically or horizontally. Here is some code that you might give you some ideas.

SCREEN 12
COLOR 2
RANDOMIZE 509


DO


X = RND
X = INT(X * 79) + 1

Y = RND
Y = INT(Y * 24) + 1


BIT = RND
BIT = INT(BIT * 3)
IF BIT = 0 THEN BIT$ = "0"
IF BIT = 1 THEN BIT$ = "1"
IF BIT = 2 THEN BIT$ = " "

LOCATE Y, X


PRINT BIT$

LOOP


 
try this too


'SCREEN 12
COLOR 2
RANDOMIZE 509


DO


X = RND
X = INT(X * 79) + 1

Y = RND
Y = INT(Y * 24) + 1


BIT = RND
BIT = INT(BIT * 3)
IF BIT = 0 THEN BIT$ = "0"
IF BIT = 1 THEN BIT$ = "1"
IF BIT = 2 THEN BIT$ = " "

LOCATE Y, X
FOR i = 1 TO 1000: NEXT i


PRINT BIT$

LOOP
 
the #'s run vertically from top to bottom

thanx, for all the help so far
 
That was cool, Hardcore. The only thing it needs is a way to break out of the loop on a key-press.

VCA.gif

Alt255@Vorpalcom.Intranets.com
 
And, as NEED-HELP noted, a semicolon at the end of the PRINT BIT$
VCA.gif

Alt255@Vorpalcom.Intranets.com
 
can anyone tell me how to make this run in vertical rows down the screen?
 
I want this to run like hardcore's version but run down the screen vertically. can anyone hel?? how about you hardcore??
 
i don't do graphics... too much work vs outcome to motivate me. heres how you could do it using get and put, but this very very rough, and gets garbles after a little while.

this writes some random 1s and 0s to the screen, captures two vertical rectangles using GET quickly before you can see it. then you specify a startpoint for the upper left corner of the rectangle, put the rectangle there, and increase that point downward for a random interval.

the first challenge you would have with this is, one, you would need to PUT the sequences in increments(both x and y) and dimension the GET rectangle just right so wherever a sequence stopped it would not clash with a sequence which was put there previously..you can see where i took a random stab at this with the MOD and STEP statements...

the next challenge you'd have is PUTing enough sequences on the screen. not that this is too difficult conceptually but the GET and PUT statements aren't too obliging in allowing you to be flexible with arrays.

another challenge is the fact that (with what little I know about PUT) - you can't PUT off the screen. That's the reason for the ON ERROR RESUME NEXT, and you'll see that when some sequences blink that's when there was an error.



SCREEN 12
COLOR 2
RANDOMIZE 609
ON ERROR RESUME NEXT

DIM Matrix(1 TO 800)
DIM Matrix2(1 TO 400)

FOR y = 1 TO 25
FOR x = 1 TO 80

a = RND
a = INT(a * 2)
IF a = 0 THEN f$ = "0"
IF a = 1 THEN f$ = "1"
LOCATE y, x
PRINT f$;
NEXT x
NEXT y

GET (8, 15)-(15, 256), Matrix
GET (31, 15)-(39, 125), Matrix2

CLS


DO

x = RND
x = INT(x * 90) + 1
x = x * 8
IF x MOD 2 <> 0 THEN x = x + 1


b = RND
b = INT(b * 16) + 1
b = b * 14
IF b MOD 2 <> 0 THEN b = b + 1

FOR y = 1 TO b STEP 14



PUT (x, y), Matrix, PSET
PUT (x + 49, y - 13), Matrix, PSET
PUT (x - 49, y + 13), Matrix2, PSET



PUT (x, y), Matrix, XOR
PUT (x + 49, y - 13), Matrix, XOR
PUT (x - 49, y + 13), Matrix2, XOR

f = 0


NEXT y
h = RND
h = INT(h * 3)
SELECT CASE h
CASE 0: PUT (x, y), Matrix
CASE 1: PUT (x + 49, y - 13), Matrix
CASE 2: PUT (x - 49, y + 13), Matrix2

END SELECT


LOOP




 
hardcore100110,

here's a slight modification to your original code.

'--start of code
SCREEN 12
COLOR 2
RANDOMIZE 509
WIDTH , 60

DO

X = RND
X = INT(X * 79) + 1

Y = RND
Y = INT(Y * 60) + 1

BIT = RND
BIT = INT(BIT * 3)
IF BIT = 0 THEN BIT$ = &quot;0&quot;
IF BIT = 1 THEN BIT$ = &quot;1&quot;
IF BIT = 2 THEN BIT$ = &quot; &quot;

LOCATE Y, X
'FOR I = 1 TO 100: NEXT I
IF INKEY$ <> &quot;&quot; THEN EXIT DO

PRINT BIT$;

LOOP

TheMatrixMsg:
LOCATE 59, 40
PRINT &quot;O&quot;;
LOCATE 14, 40
PRINT &quot;H&quot;;
LOCATE 29, 43
PRINT &quot;X&quot;;
LOCATE 29, 41
PRINT &quot;R&quot;;
LOCATE 14, 39
PRINT &quot;T&quot;;
LOCATE 29, 38
PRINT &quot;M&quot;;
LOCATE 44, 40
PRINT &quot;A&quot;;
LOCATE 29, 40
PRINT &quot;T&quot;;
LOCATE 44, 39
PRINT &quot;H&quot;;
LOCATE 14, 41
PRINT &quot;E&quot;;
LOCATE 29, 42
PRINT &quot;I&quot;;
LOCATE 44, 41
PRINT &quot;S&quot;;
LOCATE 59, 39
PRINT &quot;Y&quot;;
LOCATE 29, 39
PRINT &quot;A&quot;;
LOCATE 59, 41
PRINT &quot;U&quot;;

CleanUpScrn:
FOR RowCycle = 1 TO 60
FOR ColCycle = 1 TO 80
CleanOut = SCREEN(RowCycle, ColCycle)
IF CleanOut < 65 THEN
LOCATE RowCycle, ColCycle
PRINT &quot; &quot;;
END IF
FOR SlowDown = 1 TO 100: NEXT
NEXT
NEXT

'--end of code

--MiggyD
 
I like it Miggy! Very cool for such a small program. Hows that NEED-HELP?



 
hardcore, for some reason your program does not work. when i try to run it errors appear. can u please fix it.

Miggy, I like it but it doesn't scroll down horizontally.

 
You probably need QB7. That third code is really crappy though, it was just meant point you in the direction of using GET and PUT.

Miggy could probably come up with something using PRINT that would scroll vertically, and would probably be less complicated.

BTW, I happened upon a professional Matrix screen saver and downloaded it. Its not too bad. Sorry I don't have a link.

 
Hey NEED-HELP!

You don't need QB7. It took me 7 seconds (well...maybe 10 seconds) to figuer out the problem. But, I had the same error &quot;expected goto&quot;. You need to fix the following to see hardcore100110's Vertical work in QB1.1 or 4.5


change:
ON ERROR RESUME NEXT

to:
[red]ON ERROR GOTO ScreenError[/red]

after you type the above patch, go to the end of the program {hold CTRL and press END} and type the following:

[red]END

ScreenError:
RESUME NEXT[/red]

Note that &quot;ScreenError&quot; is a line lable. But if you re-code it like I'm telling you to, it will work--granted it's not the best...but you'll need to understand graphic statements. There are plenty of tutorials on the web in reference to graphics in QB.

And, I'm sure that I could possibly create a vertical display for this particular code, but you haven't shown us any of your own code yet. See, I'm in to teamwork. So, I'll wait till I see some of your code and try helping you out from there. OK?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top