Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

The 20 Line Challenge / Mystify your mind

Author
Message
andrew11
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 15th Mar 2003 21:54
I was looking a the screensaver one day and tried to recreate it.
Pretty easy actually.

speed# = 2.0:polys = 2:lines = 2:space = 3: ink RGB(24,97,218),RGB(0,0,0)
Randomize 1
Dim direction(polys,8): Dim points#(polys,8)
For n = 1 To polys
For x = 1 To 4
points#(n,x) = rnd(screen width()):points#(n,x+4) = rnd(screen height())
direction(n,x) = rnd(2)+1: If direction(n,x) = 2 Then direction(n,x) = -1: direction(n,x+4) = rnd(2)+1: If direction(n,x+4)= 2 Then direction(n,x+4)=-1
Next x: Next n
Do
CLS
For n = 1 To polys
For x = 1 To 4
points#(n,x) = points#(n,x) + direction(n,x)*speed#: points#(n,x+4) = points#(n,x+4) + direction(n,x+4)*speed#
If points#(n,x) > screen width() or points#(n,x) screen height() or points#(n,x+4)
"All programmers are playwrights and all computers are lousy actors."
-Anon.
andrew11
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 15th Mar 2003 21:55
I don't think a code box on the first post works.

Here's the code:



"All programmers are playwrights and all computers are lousy actors."
-Anon.
andrew11
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 15th Mar 2003 23:06
Mystify your mind V2.0

Added psycadellic colors and took out CLS because it looks cooler without.



"All programmers are playwrights and all computers are lousy actors."
-Anon.
Attreid
21
Years of Service
User Offline
Joined: 27th Nov 2002
Location:
Posted: 18th Mar 2003 20:03
it's nice
I'll hide the mouse and run the programm when my mother works

I'm the God who made the world in seven lines.
I'm the Evil who destroyed this world in one line.
andrew11
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 18th Mar 2003 22:15 Edited at: 19th Mar 2003 23:37
There's just one problem- If you leave the second one on for too long, like in a screensaver, many errors like "Insuffitient memory" keep popping up.

"All programmers are playwrights and all computers are lousy actors."
-Anon.
[href]www.geocities.com/andrew11m/[/href]
Eponick
21
Years of Service
User Offline
Joined: 18th Mar 2003
Location:
Posted: 19th Mar 2003 01:52
I cant get it to work, it might be because im still using trial, but the lines dont move.. On the first one they just shake and they dont move at all on the second one, but the colors change.

andrew11
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 19th Mar 2003 23:36
It must just be for DB pro then.

"All programmers are playwrights and all computers are lousy actors."
-Anon.
[href]www.geocities.com/andrew11m/[/href]
andrew11
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 19th Mar 2003 23:46
I was thinking about making it into a screensaver, but I want the variables to be changable by the user. You know how when you change your screensaver, you can go to settings and change colors, speed, etc. Does anyone know how I can use that?

"All programmers are playwrights and all computers are lousy actors."
-Anon.
[href]www.geocities.com/andrew11m/[/href]
Superbeest
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: Netherlands
Posted: 20th Mar 2003 01:16
You can try to read things (variables) from a file? A simple settings program must write some things and your saver can load them. Perhaps that works?

By steel will thy flesh divide
andrew11
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 20th Mar 2003 02:30 Edited at: 23rd Mar 2003 06:09
I've tried that, but I don't want to use another file.

I mean:

http://www.geocities.com/andrew11m/images/screen.bmp

Youll have to paste it in your browser.

Stupid Geocities

If I click on that, the screen saver is executed, no variables.

"All programmers are playwrights and all computers are lousy actors."

-Anon.

[href]www.geocities.com/andrew11m[/href]

Login to post a reply

Server time is: 2024-05-04 16:05:47
Your offset time is: 2024-05-04 16:05:47