01-29-2003, 07:32 AM
Quote:Cool screensaver. Putting the variables in a string can save you at least 2 lines of code.
Hmm...you're right. Ok, here's that version, making it a 7 line saver doing the exact thing...
Code:
1 SCREEN 13 'below holds the clr%, x%, y%
2 A$ = CHR$(16) + MKI$(RND * 320) + MKI$(RND * 200)
3 FOR z% = (RND * 15 + 1) TO 1 STEP -1
4 CIRCLE (CVI(MID$(A$, 2, 2)), CVI(MID$(A$, 4, 2))), z%, ASC(MID$(A$, 1, 1))
5 IF INKEY$ = "" THEN PAINT (CVI(MID$(A$, 2, 2)), CVI(MID$(A$, 4, 2))), ASC(MID$(A$, 1, 1)) ELSE END
6 IF z% = 1 THEN GOTO 2 ELSE MID$(A$, 1) = CHR$(ASC(MID$(A$, 1, 1)) + 1)
7 NEXT
(sorry if that code word-wraps on your screen)
- Dav
Visit Dav's Qbasic Site