View
previous topic :: View
next topic |
Author |
Message |
relsoft Sanzo

Joined:
05 Nov 2001 Posts: 763 Location: Philippines
|
Posted: 27 Jan
2003 03:47 Post
subject: Challenge.... |
|
|
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!!!! _________________ Medium or Rare?
Mysite: Genso'
Junkyard Our game: Frantic Journey
New FJ Screenies:
http://polacka.xepher.net/ | |
Back
to top |
|
 |
Agamemnus Guru

Joined:
15 Jan 2003 Posts: 260
|
Posted: 28 Jan
2003 03:32 Post
subject: . |
|
|
.. _________________ "Life is on the edge
of Chaos" -- Carl Sagan
Last edited by Agamemnus on 31 Jan 2003
03:33; edited 1 time in total | |
Back
to top |
|
 |
Glenn Guru

Joined:
14 Dec 2002 Posts: 266
|
Posted: 28 Jan
2003 03:35 Post
subject: Four lines ... |
|
|
CLS WHILE INKEY$ = ""
WEND END _________________ Travelling Curmudgeon
(geocities sites require copying and pasting
URLs.) | |
Back
to top |
|
 |
relsoft Sanzo

Joined:
05 Nov 2001 Posts: 763 Location: Philippines
|
Posted: 28 Jan
2003 03:52 Post
subject: Re: Four lines ... |
|
|
Glenn wrote: |
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
| _________________ Medium or Rare?
Mysite: Genso'
Junkyard Our game: Frantic Journey
New FJ Screenies:
http://polacka.xepher.net/ | |
Back
to top |
|
 |
Glenn Guru

Joined:
14 Dec 2002 Posts: 266
|
Posted: 28 Jan
2003 06:50 Post
subject: You forgot to pull the trigger. |
|
|
. _________________ Travelling Curmudgeon
(geocities sites require copying and pasting
URLs.) | |
Back
to top |
|
 |
Guest
|
Posted: 28 Jan
2003 14:20 Post
subject: |
|
|
OH! DRAW!!! I can decrease
my line size by a little with that!! But then it gets REALLY
complicated.  | |
Back
to top |
|
 |
Agamemnus Guru

Joined:
15 Jan 2003 Posts: 260
|
Posted: 28 Jan
2003 15:38 Post
subject: agamemnus |
|
|
(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"
| _________________ "Life is on the edge
of Chaos" -- Carl Sagan
Last edited by Agamemnus on 01 Feb 2003
01:59; edited 2 times in
total | |
Back
to top |
|
 |
BlueKeyboard Surfing Keyboard

Joined:
19 Apr 2002 Posts: 322
|
Posted: 28 Jan
2003 21:22 Post
subject: |
|
|
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
| _________________ Visit Blind Coding | |
Back
to top |
|
 |
Dav Webmaster

Joined:
08 Sep 2001 Posts: 200 Location: USA
|
Posted: 28 Jan
2003 22:20 Post
subject: |
|
|
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 | |
Back
to top |
|
 |
Agamemnus Guru

Joined:
15 Jan 2003 Posts: 260
|
Posted: 28 Jan
2003 23:13 Post
subject: that's nice. I really ought to improve mine
now!! |
|
|
Cool screensaver. Putting
the variables in a string can save you at least 2 lines of
code.
Interesting screensaver Keyboard. But no exit
condition?  _________________ "Life
is on the edge of Chaos" -- Carl Sagan | |
Back
to top |
|
 |
Hexadecimal Disaster Ancient Guru

Joined:
02 Jun 2002 Posts: 642 Location: Chile
|
Posted: 29 Jan
2003 02:28 Post
subject: |
|
|
What about Ctrl + Break?  | |
Back
to top |
|
 |
Dav Webmaster

Joined:
08 Sep 2001 Posts: 200 Location: USA
|
Posted: 29 Jan
2003 02:32 Post
subject: Re: that's nice. I really ought to improve mine
now!! |
|
|
Agamemnus
wrote: |
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 | |
Back
to top |
|
 |
relsoft Sanzo

Joined:
05 Nov 2001 Posts: 763 Location: Philippines
|
|
Back
to top |
|
 |
LooseCaboose Senior Member

Joined:
16 Apr 2002 Posts: 183 Location: New Zealand
|
Posted: 29 Jan
2003 11:36 Post
subject: |
|
|
Heres a Matrix like screen
saver. I cant get it down to 9 lines with the palette changing
code so Ill make that optional.
Code: |
1 screen 12 2 FOR k = 1 TO 33
STEP 8 3 FOR i = 1 TO 6 4
COLOR INT(RND * 15) + 1 5
LOCATE 29, (i + k - 1) * 2 6
IF k = 33 AND i = 6 THEN PRINT INT(RND * 10) ELSE
PRINT INT(RND * 10); 7 NEXT 8 NEXT
9 IF INKEY$ = "" THEN GOTO 1
|
The
optional palette code sits between lines 1 and 2 and sets the
colors to 16 shades of green for a real Matrix look .
I didnt actually write this bit and I cant remember who I
stole it from either.
Code: |
OUT &H3C8, 0 FOR i = 0 TO 15
OUT &H3C9, (0) OUT &H3C9, (i * 4)
OUT &H3C9, (0) NEXT
| | |
Back
to top |
|
 |
relsoft Sanzo

Joined:
05 Nov 2001 Posts: 763 Location: Philippines
|
Posted: 29 Jan
2003 11:46 Post
subject: |
|
|
Actually you could fit it
in 9 lines loose.
Tips:
1. Use Strings for
vars as long as the values are less than 256 you could have as
many vars in one line as you want.
2. One OUT
statement is enough for rotations Ie. Do X=(X+1)
mod 1024 Out (&h3c8)+((X and 3)=0), "insert formula
here loop
3. You can do away with the For Do
Loops _________________ Medium or Rare?
Mysite: Genso'
Junkyard Our game: Frantic Journey
New FJ Screenies:
http://polacka.xepher.net/ | |
Back
to top |
|
 |
Dav Webmaster

Joined:
08 Sep 2001 Posts: 200 Location: USA
|
Posted: 29 Jan
2003 14:50 Post
subject: |
|
|
Played around with it a bit
more (since I had 2 more lines to use
)
In this version, PALETTE is used both to make the
gradient pallette and as a method for delay. Ball size is
increased.
Big BLUE balls....
Code: |
1 SCREEN 13 2 FOR c%
= -1 TO 63 3 IF c% = -1 THEN A$ =
MKI$(RND * 320) + MKI$(RND * 200) + CHR$(8) ELSE PALETTE
c%, c% * 65536 4 NEXT 5 FOR z% = RND
* 54 TO 0 STEP -1 6 MID$(A$, 5,
1) = CHR$(ASC(MID$(A$, 5, 1)) + 1) 7
IF INKEY$ = "" THEN CIRCLE (CVI(MID$(A$, 1, 2)),
CVI(MID$(A$, 3, 2))), z%, ASC(MID$(A$, 5, 1)) ELSE END
8 IF z% = 0 THEN GOTO 2 ELSE
PAINT (CVI(MID$(A$, 1, 2)), CVI(MID$(A$, 3, 2))),
ASC(MID$(A$, 5, 1)) 9 NEXT
|
-
Dav
Last edited by Dav on
29 Jan 2003 19:36; edited 3 times in
total | |
Back
to top |
|
 |
BlueKeyboard Surfing Keyboard

Joined:
19 Apr 2002 Posts: 322
|
Posted: 29 Jan
2003 18:01 Post
subject: Re: that's nice. I really ought to improve mine
now!! |
|
|
Agamemnus
wrote: |
Cool screensaver. Putting the variables
in a string can save you at least 2 lines of code.
Interesting screensaver Keyboard. But no exit
condition?  | Thx ,
in the QB IDE just press CTRL+Break. (But it doesn't work
if you compile it). _________________ Visit Blind Coding | |
Back
to top |
|
 |
relsoft Sanzo

Joined:
05 Nov 2001 Posts: 763 Location: Philippines
|
Posted: 30 Jan
2003 05:31 Post
subject: |
|
|
Wow!!!! These savers a
great!!!!
Keep it up!!!
I would prolly post a
Plasma when I get to code. Haven't code for 2 weeks 'cept for
an hour yesterday.
My plasma would use Sin
Additions. ie. Slow as hell
;*) _________________ Medium or Rare?
Mysite: Genso'
Junkyard Our game: Frantic Journey
New FJ Screenies:
http://polacka.xepher.net/ | |
Back
to top |
|
 |
Neo Neo Deus
Ex Machina

Joined:
09 Aug 2002 Posts: 328 Location: The Netherlands
|
Posted: 30 Jan
2003 11:15 Post
subject: |
|
|
I made a plasma background
for my NTLOADER.EXE program.
(hehe). _________________ ___=== Neo ===___ ___===
Deus ===___ ___=== Ex ===___ ___=== Machina ===___
Go
for some programming action!
BlindCoding | |
Back
to top |
|
 |
Antoni Gual Forum Regular

Joined:
08 Dec 2002 Posts: 90 Location: Barcelona, Spain
|
Posted: 30 Jan
2003 23:14 Post
subject: |
|
|
Here is my screen saver.
See if your eyes can stand it..
Code: |
1 SCREEN 13 2 t% = RND * 345
3 WAIT &H3DA, 8 4 FOR i% = 0 TO 199 5
FOR j% = 0 TO 319 6 k% = ((k% + t% XOR j% XOR i%))
AND &HFF 7 PSET (j%, i%), k% 8 NEXT j%, i%
9 IF LEN(INKEY$) THEN END ELSE GOTO 2
| _________________ Antoni | |
Back
to top |
|
 |
Agamemnus Guru

Joined:
15 Jan 2003 Posts: 260
|
Posted: 30 Jan
2003 23:53 Post
subject: ! |
|
|
whoah! _________________ "Life is on the
edge of Chaos" -- Carl Sagan | |
Back
to top |
|
 |
Antoni Gual Forum Regular

Joined:
08 Dec 2002 Posts: 90 Location: Barcelona, Spain
|
Posted: 31 Jan
2003 00:07 Post
subject: A more eye-friendly one... |
|
|
Rel: Can I post more than
once?
Code: |
1 IF re THEN CLEAR ELSE SCREEN
13 2 x = RND * 320 3 y = RND * 199 4 im2 =
im * im 5 im = 2 * re * im + (y / 100 - 1) 6 re
= re * re - im2 + (x / 120 - 1.9) 7 iter% = iter% +
1 8 IF ABS(re) + ABS(im) > 2 OR iter% > 254
THEN PSET (x, y), iter% ELSE GOTO 4 9 IF LEN(INKEY$)
= 0 THEN GOTO 1
| _________________ Antoni | |
Back
to top |
|
 |
wizardlife Desert Wanderer

Joined:
09 Oct 2001 Posts: 846 Location: Toronto, Canada
|
Posted: 31 Jan
2003 01:25 Post
subject: |
|
|
LooseCaboose
wrote: |
Heres a Matrix like screen saver. I cant
get it down to 9 lines with the palette changing code so
Ill make that optional.
Code: |
1 screen 12 2 FOR k = 1 TO
33 STEP 8 3 FOR i = 1 TO 6
4 COLOR INT(RND * 15) + 1
5 LOCATE 29, (i + k - 1) *
2 6 IF k = 33 AND i = 6
THEN PRINT INT(RND * 10) ELSE PRINT INT(RND * 10);
7 NEXT 8 NEXT 9 IF INKEY$
= "" THEN GOTO 1
|
| You could lose one line by using poke
($B800) instead of locate, colour, and print...
Oh
wait, I'm retarded... you'd still need a def seg...
nevermind. _________________ w i z a r d c o d e o n l i n
e | |
Back
to top |
|
 |
wizardlife Desert Wanderer

Joined:
09 Oct 2001 Posts: 846 Location: Toronto, Canada
|
Posted: 31 Jan
2003 02:40 Post
subject: |
|
|
Okay, here's my (tentative)
entry:
Code: |
1 RANDOMIZE TIMER 2 DEF SEG =
&HB800 3 vars& = 40 + (12 * 256) + (2 *
65536) 4 IF PEEK(((vars& AND 255) + ((vars&
\ 256 AND 255) * 80)) * 2) = 32 THEN POKE (((vars&
AND 255) + ((vars& \ 256 AND 255) * 80)) * 2), 219
ELSE POKE (((vars& AND 255) + ((vars& \ 256 AND
255) * 80)) * 2), 32 5 IF (vars& \ 65536) = 0
THEN vars& = vars& - 256 ELSE IF (vars& \
65536) = 1 THEN vars& = vars& + 1 ELSE IF
(vars& \ 65536) = 2 THEN vars& = vars& + 256
ELSE vars& = vars& - 1 6 IF (vars& \ 256
AND 255) < 1 THEN vars& = vars& + (65536 +
256) ELSE IF (vars& \ 256 AND 255) > 23 THEN
vars& = vars& + (65536 - 256) ELSE IF (vars&
AND 255) < 1 THEN vars& = vars& + 65536 + 1
ELSE IF (vars& AND 255) > 78 THEN vars& =
vars& + 65536 - 1 7 IF RND > .95 THEN
vars& = vars& + 65536 8 IF vars& >
262144 THEN vars& = vars& - 262144 9 IF
INKEY$ = "" THEN GOTO 4 'edit d'oh!
| Only as
interesting as snake savers get... you may have to slow it
down a little. I couldn't think of a really foolproof way to
do a delay in one line. I could drop the randomize timer and
make it square root 79 every cycle or something... but that'd
be different on everyone's machine. No colour, couldn't fit it
in.
edit: notepad pulled a wierd line-wrap thing on me.
edit 2: I renumbered the lines just before I saved and
it threw off the GOTO. (After twenty minutes of debugging, do
I ever feel sheepish...) _________________ w i z a r d c o d e o n l i n
e
Last edited by
wizardlife on 31 Jan 2003 18:09; edited 1 time in
total | |
Back
to top |
|
 |
toonski84 I
hold this place together

Joined:
31 May 2002 Posts: 977 Location: Melbourne,
Florida
|
Posted: 31 Jan
2003 03:07 Post
subject: |
|
|
Code: |
1 SCREEN 13 2 FOR x = 0 TO ATN(1) * 8
STEP ATN(1) / 2 3 LINE (160 + COS(a - x) * 70, 100 +
SIN(a - x) * 70)-(160 + COS(ATN(1) * 2 + x) * 70, 100 +
SIN(ATN(1) * 2 + x) * 70), c MOD 8 4 LINE (160 +
COS(a - x) * 50, 100 + SIN(a - x) * 50)-(160 +
COS(ATN(1) * 2 + x) * 50, 100 + SIN(ATN(1) * 2 + x) *
50), a MOD 8 5 c = (c + 1) MOD 16 6 a = a -
ATN(1) / 90 7 PSET (COS(RND * ATN(1) * 8) * (RND *
30 + 70) + 160, SIN(RND * ATN(1) * 8) * (RND * 30 + 70)
+ 100), RND * 255 8 NEXT x 9 GOTO
2 |
seizure-vision. at least on my xp1800.
lemme know how it flies on slower
cpus. _________________ D.A.M.M. - Drunks Against Mad
Mothers | |
Back
to top |
|
 |
|