Posts: 3,288
Threads: 167
Joined: Nov 2001
make a 9 line screen saver
;*)
Colon joined lines are not permited.
Call Absolute and Call Interrupt are not permitted.
Basically same as the old QB45 contest...
Yay!!! First post!!!!
Posts: 3,368
Threads: 195
Joined: Jan 2003
..
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."
Visit www.neobasic.net to see rubbish in all its finest.
Posts: 704
Threads: 0
Joined: Dec 2002
CLS
WHILE INKEY$ = ""
WEND
END
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Posts: 3,288
Threads: 167
Joined: Nov 2001
Quote:CLS
WHILE INKEY$ = ""
WEND
END
*Points handgun to Glenn.....
Anyways, here was my entry into the 7 line qb screen saver contest about 2 years ago. Third place.....
Code: 1 SCREEN 13
2 LOCATE 25, 1
3 S = S MOD 360 + 2
4 DRAW "ta=" + VARPTR$(S) + "C" + STR$(S \ 2) + "bm 160,98 E40 R30 F40 G40 L30 H40 H40 L30 G40 F40 R30 E40 H30 U33 E30 F30 D33 G30 G30 D33 F30 E30 U33 H30"
5 PRINT
6 IF INKEY$ = "" THEN GOTO 3
7 END
Posts: 704
Threads: 0
Joined: Dec 2002
.
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
OH! DRAW!!! I can decrease my line size by a little with that!! But then it gets REALLY complicated.
Posts: 3,368
Threads: 195
Joined: Jan 2003
(last edited -- Jan. 31, 2003)
9 Lines, with exit condition AND a wait parameter!!
Code: 1 SCREEN 7
2 RANDOMIZE TIMER
3 IF I% = 0 THEN tri$ = CHR$(1) + CHR$(INT(RND * 142) + 16) + CHR$(INT(RND * 90) + 10) + CHR$(INT(RND * 35) + 15) + CHR$(INT(RND * 14) + 1) + CHR$(1) ELSE IF LEN(tri$) > 5 THEN MID$(tri$, 6, 1) = CHR$(0)' + CHR$(INT(RND * 15))
4 wait1# = wait1# + 1
5 IF LEN(tri$) > 5 THEN IF wait1# < ASC(MID$(tri$, 6, 1)) * 30000 THEN GOTO 4 ELSE wait1# = 0
6 IF I% = ASC(MID$(tri$, 4, 1)) THEN I% = 0 ELSE I% = I% + 1
7 IF I% = CINT(ASC(MID$(tri$, 4, 1)) * ASC(MID$(tri$, 1, 1)) / 8) THEN tri$ = CHR$(ASC(MID$(tri$, 1, 1)) + 1) + MID$(tri$, 2, 3) + CHR$(15 - ASC(MID$(tri$, 5, 1)))
8 DRAW "BM" + STR$(ASC(MID$(tri$, 2, 1)) + 4) + "," + STR$(ASC(MID$(tri$, 3, 1)) * 3 - 3 - j%) + "P0,15" + "C" + STR$(ASC(MID$(tri$, 5, 1)) * (1 - (I% = 0) * -1)) + "BM" + STR$(ASC(MID$(tri$, 2, 1)) * 2) + "," + STR$(ASC(MID$(tri$, 3, 1)) * 2 - j%) _
+ "E" + STR$(I%) + "C" + STR$(ASC(MID$(tri$, 5, 1)) * (1 - (I% = 0) * -1)) + "BM" + STR$(ASC(MID$(tri$, 2, 1)) * 2) + "," + STR$(ASC(MID$(tri$, 3, 1)) * 2 - j%) + "BLR" + STR$(I% * 2 + 1) + "C" + STR$(ASC(MID$(tri$, 5, 1)) * (1 - (I% = 0) * -1)) + _
"BM" + STR$(ASC(MID$(tri$, 2, 1)) * 2 + I%) + "," + STR$(ASC(MID$(tri$, 3, 1)) * 2 - I% - j%) + "F" + STR$(I%)
9 IF INKEY$ = "" THEN GOTO 3 ELSE PRINT "By Agamemnus! Email me at:"; SPACE$(40); "Warlordagamemnus@aol.com"
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."
Visit www.neobasic.net to see rubbish in all its finest.
Posts: 81
Threads: 0
Joined: Apr 2002
Here's my "amazing" screensaver  :
Code: SCREEN 13
DO
FOR A% = 0 TO 359
PSET (COS(A% * 3.1415 / 180) * R% + 160, SIN(A% * 3.1415 / 180) * R% + 100), A% + C%
NEXT
WAIT &H3DA, 8
C% = C% + 1
R% = INT(RND * 100)
LOOP
Posts: 440
Threads: 65
Joined: Sep 2001
Worked on one for hours today, but just couldn't get it under 10 lines, so here's one I already had that made it to 9 lines that I'll post instead.
It's just your basic 3D balls filling up the screen 'till a keypress...
Code: 1 SCREEN 13
2 clr% = 16
3 x% = RND * 320
4 y% = RND * 200
5 FOR z% = (RND * 15 + 1) TO 1 STEP -1
6 CIRCLE (x%, y%), z%, clr%
7 IF INKEY$ = "" THEN PAINT (x%, y%), clr% ELSE END
8 IF z% = 1 THEN GOTO 2 ELSE clr% = clr% + 1
9 NEXT
- Dav
Posts: 3,368
Threads: 195
Joined: Jan 2003
Cool screensaver. Putting the variables in a string can save you at least 2 lines of code.
Interesting screensaver Keyboard. But no exit condition?
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."
Visit www.neobasic.net to see rubbish in all its finest.
|