Qbasicnews.com

QbasicNews.Com => Challenges => Topic started by: relsoft on January 27, 2003, 12:47:51 AM



Title: Challenge....
Post by: relsoft on January 27, 2003, 12:47:51 AM
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!!!!


Title: .
Post by: Agamemnus on January 28, 2003, 12:32:21 AM
..


Title: Four lines ...
Post by: Glenn on January 28, 2003, 12:35:24 AM
CLS
WHILE INKEY$ = ""
WEND
END


Title: Re: Four lines ...
Post by: relsoft on January 28, 2003, 12:52:56 AM
Quote from: "Glenn"
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



Title: You forgot to pull the trigger.
Post by: Glenn on January 28, 2003, 03:50:29 AM
.


Title: Challenge....
Post by: Anonymous on January 28, 2003, 11:20:52 AM
OH! DRAW!!! I can decrease my line size by a little with that!! But then it gets REALLY complicated. :(


Title: agamemnus
Post by: Agamemnus on January 28, 2003, 12:38:41 PM
(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"


Title: Challenge....
Post by: BlueKeyboard on January 28, 2003, 06:22:56 PM
Here's my "amazing" screensaver :D:
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


Title: Challenge....
Post by: Dav on January 28, 2003, 07:20:32 PM
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


Title: that's nice. I really ought to improve mine now!!
Post by: Agamemnus on January 28, 2003, 08:13:10 PM
Cool screensaver. Putting the variables in a string can save you at least 2 lines of code.

Interesting screensaver Keyboard. But no exit condition? :(


Title: Challenge....
Post by: Hexadecimal Disaster on January 28, 2003, 11:28:58 PM
What about Ctrl + Break?  :P


Title: Re: that's nice. I really ought to improve mine now!!
Post by: Dav on January 28, 2003, 11:32:21 PM
Quote from: "Agamemnus"
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


Title: Challenge....
Post by: relsoft on January 29, 2003, 01:16:49 AM
Kewl ScreenSaver guys!!!!


Title: Challenge....
Post by: LooseCaboose on January 29, 2003, 08:36:41 AM
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 8). 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


Title: Challenge....
Post by: relsoft on January 29, 2003, 08:46:03 AM
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


Title: Challenge....
Post by: Dav on January 29, 2003, 11:50:59 AM
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


Title: Re: that's nice. I really ought to improve mine now!!
Post by: BlueKeyboard on January 29, 2003, 03:01:28 PM
Quote from: "Agamemnus"
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 :bounce:, in the QB IDE just press CTRL+Break.
(But it doesn't work if you compile it).


Title: Challenge....
Post by: relsoft on January 30, 2003, 02:31:01 AM
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

;*)


Title: Challenge....
Post by: Neo on January 30, 2003, 08:15:19 AM
I made a plasma background for my NTLOADER.EXE program. (hehe).


Title: Challenge....
Post by: Antoni Gual on January 30, 2003, 08:14:12 PM
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


Title: !
Post by: Agamemnus on January 30, 2003, 08:53:38 PM
whoah!


Title: A more eye-friendly one...
Post by: Antoni Gual on January 30, 2003, 09:07:56 PM
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


Title: Challenge....
Post by: wizardlife on January 30, 2003, 10:25:48 PM
Quote from: "LooseCaboose"
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.


Title: Challenge....
Post by: wizardlife on January 30, 2003, 11:40:54 PM
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.  :cry:

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...)


Title: Challenge....
Post by: toonski84 on January 31, 2003, 12:07:32 AM
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.


Title: Challenge....
Post by: Agamemnus on January 31, 2003, 12:35:28 AM


Title: Challenge....
Post by: relsoft on January 31, 2003, 01:46:51 AM
Okay Here's my translucen plasma....


Code:


'Here's my entry(translucent Plasma!!!)
'I could have made this a lil bit smaller.
'Relsoft
'Note: you may not notice a thing in about 20 secs as its setting
'up the palette.

1 SCREEN 13     ': FOR I = 0 TO 255: LINE (I, 0)-(I, 10), I: NEXT I'Unrem to see the Pal
2 J& = (J& + 1) AND &H7FFFFFFF
3 IF J& < 257 THEN PALETTE J& - 1, 65536 * INT(32 - 31 * SIN(J& * 3.14151693# / 128)) + 256 * INT(32 - 31 * SIN(J& * 3.14151693# / 64)) + INT(32 - 31 * SIN(J& * 3.14151693# / 32)) ELSE R% = 64
4    FOR y% = 0 TO 100
5    FOR x% = 0 TO 160
6            R% = -R%
7            IF J& > 256 THEN PSET (x% + 80, y% + 50), (SIN((x% + R%) / (28)) * 32) + (SIN((x% + R% + (J& MOD 284)) / (45)) * -128) + (SIN((y% + R%) / (32)) * 64)
8   NEXT x%, y%
9   IF INKEY$ = "" THEN 2





Could have made this better but ran out of time....

;*)

PS. Antoni: Post as many as you want!!!!


Title: The Matrix revisited
Post by: Antoni Gual on January 31, 2003, 12:52:22 PM
Rel: Your saver is the winner! Wow!..

Here is another one. Sorry for the lack of color...

Code:

1 DEF SEG = &HB800
2 FOR i% = 0 TO 159 STEP 4
'  adjust this speed constant for optimal effect
'             |    0 no speed ;) .05 should be too fast even for a 386
'             |
3  IF RND < .0005 THEN j% = 3840 ELSE j% = -1
4  IF j% > 0 THEN POKE j% + i%, PEEK(j% - 160 + i%)
5  IF j% > 0 THEN j% = j% - 160
6  IF j% > 0 THEN GOTO 4
7  IF j% = 0 THEN IF RND > .3 THEN POKE i%, 96 * RND + 32 ELSE POKE i%, 32
8 NEXT
9 IF LEN(INKEY$) = 0 THEN GOTO 2


Title: Challenge....
Post by: BlueKeyboard on January 31, 2003, 01:19:43 PM
First screen 12 ASCII circle routine? :lol:.
Code:

SCREEN 12
FOR C% = 64 TO 76
FOR R% = 0 TO 14
FOR I% = 1 TO 360
COLOR R%: LOCATE 15 + INT(SIN(I% * 3.1415 / 180) * R%), 40 + INT(COS(I% * 3.1415 / 180) * R%): PRINT CHR$(C% + R%)
NEXT
NEXT
WAIT &H3DA, 8
NEXT


Title: Challenge....
Post by: wizardlife on January 31, 2003, 02:44:53 PM
Quote from: "Agamemnus"
wizardlife, is your whole screensaver a box in the center? :(


Wasn't intended to be. Hang on.

edit: Hmm... it worked last night. Gimme another minute.

edit 2: done. Point the GOTO to line 4 instead of 3. I added the Randomize Timer at the last minute and it threw off the line numbers.


Title: Do you want another one?
Post by: Antoni Gual on January 31, 2003, 02:51:52 PM
Code:

1 SCREEN 12
2  v% = RND * 20 + 10
3 REDIM VX%(v%), VY%(v%)
4 FOR d1% = -1 TO v%
5 FOR d2% = d1% + 1 TO v%
6  IF d1% = -1 THEN VX%(d2%) = 320 + (SIN(6.283185 * (d2% / v%)) * 239) ELSE LINE (VX%(d1%), VY%(d1%))-(VX%(d2%), VY%(d2%)), (v% MOD 16) + 1
7  IF d1% = -1 THEN VY%(d2%) = 240 + (COS(6.283185 * (d2% / v%)) * 239)
8 NEXT d2%, d1%
9 IF LEN(INKEY$) = 0 THEN GOTO 2


Title: Re: Do you want another one?
Post by: wizardlife on January 31, 2003, 03:24:20 PM
Quote from: "Antoni Gual"
Code:

1 SCREEN 12
2  v% = RND * 20 + 10
3 REDIM VX%(v%), VY%(v%)
4 FOR d1% = -1 TO v%
5 FOR d2% = d1% + 1 TO v%
6  IF d1% = -1 THEN VX%(d2%) = 320 + (SIN(6.283185 * (d2% / v%)) * 239) ELSE LINE (VX%(d1%), VY%(d1%))-(VX%(d2%), VY%(d2%)), (v% MOD 16) + 1
7  IF d1% = -1 THEN VY%(d2%) = 240 + (COS(6.283185 * (d2% / v%)) * 239)
8 NEXT d2%, d1%
9 IF LEN(INKEY$) = 0 THEN GOTO 2

Yikes, it's like spyrograph or something... nice... I need to experiment more with all this trig stuff you guys are pulling.


Title: Challenge....
Post by: wizardlife on January 31, 2003, 03:55:51 PM
The standard 'pinwheel':
Code:

1 SCREEN 12
2 FOR colour = 0 TO 15
3 PALETTE colour, colour * 4
4 NEXT
5 angle! = angle! + .1
6 colour = colour + 1
7 IF colour > 15 THEN colour = 0 ELSE IF angle! > 360 THEN angle! = angle! - 360
8 PSET (INT(SIN(angle!) * angle!) + 320, INT(COS(angle!) * angle!) + 240), colour
9 IF INKEY$ = "" THEN GOTO 5

EDIT: There it is with the palette switched.


Title: Challenge....
Post by: wizardlife on January 31, 2003, 04:06:45 PM
The non-standard pinwheel:
Code:

1 SCREEN 12
2 FOR colour = 0 TO 15
3 PALETTE colour, colour * 4 * 65536 + (colour * 2)
4 NEXT
5 angle! = angle! + .1
6 colour = colour + 1
7 IF colour > 15 THEN colour = 0 ELSE IF angle! > 360 THEN angle! = angle! - 360
8 PSET (INT(SIN(angle!) * angle! + angle!), INT(COS(angle!) * angle!) + 300), colour
9 IF INKEY$ = "" THEN GOTO 5


edit: just moved it from being centred at 240 to 300 (feels more balanced that way)


Title: A huge program...
Post by: Antoni Gual on January 31, 2003, 05:29:29 PM
This should not be posted here as it's 11 lines but.... Out of contest, off course.


Code:

' cube rotator in 11 lines. From a 19 liner by Entropy, shrinked by Antoni Gual
1 IF x1 = 0 THEN SCREEN 13 ELSE r = (r + .01745) + 6.283185 * (r >= 6.283185)
2  FOR x = -30 TO 30 STEP 10
3    FOR y = -30 TO 30 STEP 10
4      FOR z = -30 TO 30 STEP 10
5        x1 = ((x * COS(r) - (z * COS(r) - y * SIN(r)) * SIN(r)) * COS(r) + (y * COS(r) + z * SIN(r)) * SIN(r)) / (x * SIN(r) + (z * COS(r) - y * SIN(r)) * COS(r) + 100)
6        y1 = ((y * COS(r) + z * SIN(r)) * COS(r) - (x * COS(r) - (z * COS(r) - y * SIN(r)) * SIN(r)) * SIN(r)) / (x * SIN(r) + (z * COS(r) - y * SIN(r)) * COS(r) + 100)
7        PSET ((100 * x1 + 160), (100 * y1 + 100)), 31
8  NEXT z, y, x
9  WAIT &H3DA, 8
10 LINE (99, 39)-(221, 161), 0, BF
11 IF LEN(INKEY$) = 0 THEN GOTO 1


Title: Challenge....
Post by: Antoni Gual on January 31, 2003, 05:48:54 PM
Wizardlife: Your non-standard pinwheel is the best effect i have seen so far!  Great!


Title: Challenge....
Post by: BlueKeyboard on January 31, 2003, 05:51:34 PM
Lines inside a circle...
Code:

SCREEN 13
DO
WAIT &H3DA, 8
FOR A% = 0 TO 359
PSET (160 + COS(A% * 3.1415 / 180) * 40, 100 + SIN(A% * 3.1415 / 180) * 40), RND
NEXT
A% = INT(RND * 360)
LINE (160 + COS(A% * 3.1415 / 180) * 39, 100 + SIN(A% * 3.1415 / 180) * 39)-(160 + COS((A% + 180) * 3.1415 / 180) * 39, 100 + SIN((A% + 180) * 3.1415 / 180) * 39), INT(RND * 16) + 15
LOOP


Title: Challenge....
Post by: toonski84 on January 31, 2003, 07:19:26 PM
well, after that non-standard pinwheel i give up :P

that 'seizure vision which is not seizure visions on slow computers' is pretty much a bunch of calculated crap thrown together :)


Title: No palette rotators?
Post by: Antoni Gual on January 31, 2003, 07:31:04 PM
Here is mine:
Code:

'vortex (Kinda of..) Antoni Gual 2003
1 SCREEN 13
2 OUT &H3C7, 0
3 a$ = a$ + CHR$(INP(&H3C9))
4 CIRCLE (160, 290 - LEN(a$) ^ .79), LEN(a$) / 2.8, LEN(a$) \ 3, , , .5
5 CIRCLE (160, 290 - LEN(a$) ^ .79 + 1), LEN(a$) / 2.8, LEN(a$) \ 3, , , .5
6 IF LEN(a$) < 256 * 3 THEN 3 ELSE OUT &H3C8, 0
7 j = (j + 1) MOD (LEN(a$) - 3)
8 OUT &H3C9, ASC(MID$(a$, j + 1, 1))
9 IF LEN(INKEY$) = 0 THEN 7


 :barf:


Title: Challenge....
Post by: wizardlife on January 31, 2003, 08:58:34 PM
Quote from: "Antoni Gual"
Wizardlife: Your non-standard pinwheel is the best effect i have seen so far!  Great!


thx. I was trying to dig up all the stuff I made my graphing calculator do in grade 10 when we were supposed to be translating parabolas... (http://www.rage3d.com/board/images/smilies/laugh.gif)

I don't think anyone's going to hit rel's plasma for sheer 'cool' factor, tho.

I really like that falling text one. *runs away to watch the matrix dvd*


Title: Challenge....
Post by: Dav on January 31, 2003, 09:41:56 PM
Hey, nice posts!  Cool little screen savers.

Here's a mystify-type saver in only 5 lines. (6 if you add the delay)
It's looks like a rainbow wave...

Code:

1   IF r = 0 THEN SCREEN 12 ELSE PRINT
2   a$ = MKI$((160 * COS(r)) + 320) + MKI$((100 * SIN(r)) + 300)
3   IF r > 7.2 THEN r = 1 ELSE r = r + .05
4   LINE (CVI(MID$(a$, 1, 2)), CVI(MID$(a$, 3, 2)))-(CVI(MID$(a$, 1, 2)) + 160 * COS(r), CVI(MID$(a$, 3, 2)) + 45 + r * SIN(r)), r
    '=============
    WAIT &H3DA, 8  'add this if not smooth enough for you
    '=============
5   IF INKEY$ = "" GOTO 1 ELSE END


- Dav


Title: Challenge....
Post by: Agamemnus on January 31, 2003, 10:51:17 PM
very nice all, although the plasma one updates too slowly with PSET, and some people still don't have an exit condition. :(

I bet you could add several of those thingies in one spot with those extra lines (you'd only need 2 more.. FOR I%, NEXT I% (for different line patches), DAV. :)


Title: Challenge....
Post by: wizardlife on January 31, 2003, 11:23:56 PM
Here's to some christmas cheer!
Code:

1 SCREEN 12
2 x% = x% + 1
3 angle! = ATN((SIN(x% / 20) * 20) / x%)
4 dist! = SQR(((SIN(x% / 20) * 20) ^ 2) + (x% ^ 2))
5 PSET ((COS(angle! + y!) * dist!) + 320, (SIN(angle! + y!) * dist!) + 240), INT(y!) AND 7
6 y! = y! + 2
7 IF x% > 300 THEN x% = 0 ELSE y! = y! - 2
8 IF INKEY$ = "" THEN GOTO 2


This could _easily_ be compacted into like 4 lines, but it's slow enough as is... (crawls on my dad's 300 -- okay my 1.6 still, tho...)

Nice one dav!


Title: Challenge....
Post by: relsoft on February 01, 2003, 01:02:45 AM
I edited the plasma after seeing that the waves are almost static.

I also added the dynamic translucency....

Code:


'Here's my entry(translucent Plasma!!!)
'I could have made this a lil bit smaller.
'Relsoft
'Note: you may not notice a thing in about 20 secs as its setting
'up the palette.

1 SCREEN 13
2 J& = (J& + 1) AND &H7FFFFFFF
3 IF J& < 257 THEN PALETTE J& - 1, 65536 * INT(32 - 31 * SIN(J& * 3.14151693# / 128)) + 256 * INT(32 - 31 * SIN(J& * 3.14151693# / 64)) + INT(32 - 31 * SIN(J& * 3.14151693# / 32)) ELSE R% = 64 * (((J& AND 1) = 1) OR 1)
4    FOR y% = 0 TO 100
5    FOR x% = 0 TO 160
6            R% = -R%
7            IF J& > 256 THEN PSET (x% + 80, y% + 50), (SIN((x% + R%) / (28)) * 64) + (SIN((x% + R% + (J& MOD 284)) / (45)) * -128) + (SIN((y% + R%) / (16)) * 64)
8    NEXT x%, y%
9   IF INKEY$ = "" THEN 2





Title: Challenge....
Post by: relsoft on February 01, 2003, 01:12:41 AM
Some Rects...
Code:


'Nother entry from Rel
1 SCREEN 13
2 Var$ = "" + CHR$(INT(RND * 160)) + CHR$(INT(RND * 100)) + CHR$(INT(RND * 255)) + CHR$(INT(RND * 30)) + CHR$(INT(RND * 50))
3 LINE (ASC(MID$(Var$, 1, 1)), ASC(MID$(Var$, 2, 1)))-STEP(ASC(MID$(Var$, 5, 1)), ASC(MID$(Var$, 4, 1))), ASC(MID$(Var$, 3, 1)), BF
4 LINE (320 - ASC(MID$(Var$, 1, 1)), 200 - ASC(MID$(Var$, 2, 1)))-STEP(-ASC(MID$(Var$, 5, 1)), -ASC(MID$(Var$, 4, 1))), ASC(MID$(Var$, 3, 1)), BF
5 LINE (ASC(MID$(Var$, 1, 1)), 200 - ASC(MID$(Var$, 2, 1)))-STEP(ASC(MID$(Var$, 5, 1)), -ASC(MID$(Var$, 4, 1))), ASC(MID$(Var$, 3, 1)), BF
6 LINE (320 - ASC(MID$(Var$, 1, 1)), ASC(MID$(Var$, 2, 1)))-STEP(-ASC(MID$(Var$, 5, 1)), ASC(MID$(Var$, 4, 1))), ASC(MID$(Var$, 3, 1)), BF
7 IF INKEY$ = "" THEN 2
8 END
9 'Rem Rem Rem Rem




Paint tiling would do wonders!!!!


BTW, I'm collecting the stuff that you're posting and I'll post it on my site along with your names on it.... :*)

Keep it coming guys!!!

Koolness!!!!!


Title: Challenge....
Post by: Antoni Gual on February 01, 2003, 07:40:45 AM
Rel: This time your plasma looks really translucent! You're the best.

BTW: I ripped your sinus palette to make my vortex look better. Here it is:

Code:

'vortex (Kind of..) Antoni Gual 2003
1 SCREEN 13
2  PALETTE LEN(a$) / 3, 0
3 a$ = a$ + CHR$(32 - 31 * SIN((LEN(a$) - 60 * ((LEN(a$) MOD 3) = 2) + 60 * ((LEN(a$) MOD 3) = 1)) * 3.14151693# / 128))
4 CIRCLE (160, 290 - LEN(a$) ^ .8), LEN(a$) / 2.8, LEN(a$) \ 3, , , .5
5 CIRCLE (160, 290 - LEN(a$) ^ .8 + 1), LEN(a$) / 2.8, LEN(a$) \ 3, , , .5
6 IF LEN(a$) < 256 * 3 THEN 2 ELSE OUT &H3C8, 0
7 J = (J + 1) MOD (LEN(a$) - 3)
8 OUT &H3C9, ASC(MID$(a$, J + 1, 1))
9 IF LEN(INKEY$) = 0 THEN 7


Title: Challenge....
Post by: Antoni Gual on February 01, 2003, 08:49:49 AM
Dav's variables on string are very interesting...
This way particle systems are possible
As this classic starfield:

Code:

'starfield
1 SCREEN 13
2 a$ = STRING$(400 * 6, CHR$(0))
3 IF CVI(MID$(a$, j + 5, 2)) = 0 THEN MID$(a$, j + 1, 6) = MKI$(RND * 20000 - 10000) + MKI$(RND * 20000 - 10000) + MKI$(100 * RND + 1)
4 PSET (160 + CVI(MID$(a$, j + 1, 2)) / CVI(MID$(a$, j + 5, 2)), 100 + CVI(MID$(a$, j + 3, 2)) / CVI(MID$(a$, j + 5, 2))), 0
5 MID$(a$, j + 5, 2) = MKI$(CVI(MID$(a$, j + 5, 2)) - 1)
6 IF CVI(MID$(a$, j + 5, 2)) > 0 THEN PSET (160 + CVI(MID$(a$, j + 1, 2)) / CVI(MID$(a$, j + 5, 2)), 100 + CVI(MID$(a$, j + 3, 2)) / CVI(MID$(a$, j + 5, 2))), 32 - CVI(MID$(a$, j + 5, 2)) \ 8
7 j = (j + 6) MOD (LEN(a$))
8 IF LEN(INKEY$) = 0 THEN 3



Title: Challenge....
Post by: toonski84 on February 01, 2003, 11:24:46 AM
:o  ... i have to say that's the only and best 3d starfield i've ever seen to operate without a single loop in it.


Title: Challenge....
Post by: wizardlife on February 01, 2003, 01:47:47 PM
Infiniti Loop:
Code:

1 SCREEN 12
2 FOR a = 1 TO 15
3 PALETTE a, a * 512 + a + (a * 131072)
4 NEXT
5 x! = x! + xc!
6 IF xc! < 1 THEN xc! = xc! + .00004
7 LINE STEP(0, 0)-(COS(x!) * 320 + 320, SIN(x! * 2) * 100 + 240), INT(x!) AND 15
8 IF x! > 150 THEN x! = x! - 150
9 IF INKEY$ = "" THEN GOTO 5


This pwns anything else I've done so far.


Title: Challenge....
Post by: wizardlife on February 01, 2003, 01:56:59 PM
Quote from: "toonski84"
:o  ... i have to say that's the only and best 3d starfield i've ever seen to operate without a single loop in it.

I think that's the best one I've ever seen (http://www.rage3d.com/board/images/smilies/drool2.gif)


Title: Challenge....
Post by: toonski84 on February 01, 2003, 02:15:25 PM
whistles@wizardlife's mobius strip...  daaaang.


Title: Challenge....
Post by: Antoni Gual on February 01, 2003, 03:24:57 PM
Toonski: My starfield HAS a loop. The THEN 3 in the last line is in fact a THEN GOTO 3, it's only a weird syntax QB allows to lazy programmers.


Title: Challenge....
Post by: toonski84 on February 01, 2003, 03:26:17 PM
i know antoni :)  i was referring to the fact that you have a particle system going without any do/loop or for/next loop.


Title: A sloooooow floormapper ..
Post by: Antoni Gual on February 01, 2003, 05:56:56 PM
Code:

'Floormaper by Antoni Gual
1 SCREEN 13
2 r% = (r% - 1) AND 15
3 FOR y% = 100 TO 199
4 y1% = ((1190 / (99 - y%) + r%) AND 15)
5 y2 = 6 / (99 - y%)
6 FOR x% = 0 TO 319
7    PSET (x%, y%), CINT((159 - x%) * y2) AND 15 XOR y1% + 16
8 NEXT x%, y%
9 IF LEN(INKEY$) = 0 THEN 2


Curious: All the complication in a floormapper disappears when you forget speed....


Title: Challenge....
Post by: wildcard on February 01, 2003, 07:04:59 PM
Antoni: What next, a full 30 level game in 9 lines? ;-) Great work


Title: Re: A sloooooow floormapper ..
Post by: wizardlife on February 01, 2003, 07:07:42 PM
Quote from: "Antoni Gual"
Code:

'Floormaper by Antoni Gual
1 SCREEN 13
2 r% = (r% - 1) AND 15
3 FOR y% = 100 TO 199
4 y1% = ((1190 / (99 - y%) + r%) AND 15)
5 y2 = 6 / (99 - y%)
6 FOR x% = 0 TO 319
7    PSET (x%, y%), CINT((159 - x%) * y2) AND 15 XOR y1% + 16
8 NEXT x%, y%
9 IF LEN(INKEY$) = 0 THEN 2


Curious: All the complication in a floormapper disappears when you forget speed....

floormapper = teh beautiful


Title: RAW bitmap loader and ripple effect in 7 lines.
Post by: Antoni Gual on February 01, 2003, 07:43:06 PM
Not kidding. I presented such a thing to qb45.com screensaver contest. There was a loophole there: DATA lines did'nt count. But they disqualified me, my 300 DATA lines were too much for a loophole....

As Wilcard would kill me if I posted a 307 lines program, I uploaded it to my page.

For those curious it is at:
http://www.geocities.com/antonigual/qbsource/forest.zip
It's Geocities so right-click the link and save as.

Rel: Could we talk about a (not small) loophole?   :D


Title: Re: RAW bitmap loader and ripple effect in 7 lines.
Post by: wizardlife on February 01, 2003, 07:55:52 PM
Quote from: "Antoni Gual"
Not kidding. I presented such a thing to qb45.com screensaver contest. There was a loophole there: DATA lines did'nt count. But they disqualified me, my 300 DATA lines were too much for a loophole....


Lol. didn't even think of using DATA...


Title: Challenge....
Post by: relsoft on February 02, 2003, 12:04:49 AM
Antoni: Yeah no prob. Small loop hole?
          You beat me to it!!!!!! I was hoping to do a 9 line mode 7!!!
          Great Job!!!!
*Rel cries........


Bur definitely, DATA statements are counted.


Guess ill have to work my ass out making my 3d rotator in nine lines :*)  LOL

now, WILL SOMEBODY MAKE FIRE!!!!!!!


Title: my entry
Post by: Lithium on February 02, 2003, 01:34:31 AM
3D ssstarsss  :D

Code:
1 SCREEN 13
2 DIM starsx(1000), starsy(1000), starsz(1000)
3 IF starsz(i) <= 0 THEN starsx(i) = RND * 640 - 320
4 IF starsz(i) <= 0 THEN starsy(i) = RND * 400 - 200
5 LINE (160 + 64 * starsx(i) / (starsz(i) + 3), 100 + 64 * starsy(i) / (starsz(i) + 3))-(160 + 64 * starsx(i) / (starsz(i)+1), 100 + 64 * starsy(i) / (starsz(i)+1)), 0
6 starsz(i) = (-((TIMER * 64) MOD (100 + i / 20)) + 100 + i / 20) MOD (100 + i / 20)
7 LINE (160 + 64 * starsx(i) / (starsz(i) + 3), 100 + 64 * starsy(i) / (starsz(i) + 3))-(160 + 64 * starsx(i) / (starsz(i)+1), 100 + 64 * starsy(i) / (starsz(i)+1)), 15 - (starsz(i) * 15 / 150) + 16
8 i = (i + 1) MOD 1000
9 IF INKEY$ = "" THEN GOTO 3


maybe I'll try fire ;d -- that was fun


Title: Challenge....
Post by: Antoni Gual on February 02, 2003, 02:30:56 AM
Oh-oh. Lithium there... :o   Fasten your seat belts!    :bounce:


Title: Here's "fire"
Post by: Lithium on February 02, 2003, 03:09:02 AM
Code:
1 SCREEN 13
2 x% = (x% + 1) AND 32767
3 if c& < 255 then palette c&, c&\4 else if c& = 255 then def seg = &ha000
4 c& = c& + 1
5 line (x%\20, 101)-step(0, -3), (rnd * 32)+abs(sin(timer*16))*222
6 o% = (o% + 1) AND 32767
7 if c& => 255 then poke o%, (peek(o%) + peek(o%-1) + peek(o%+1) + peek(o%+320)) \ 4
8 if c& => 255 then poke 64000-o%, peek(o%)
9 if inkey$ = "" then goto 2


it sucks[/code]


Title: the never ending hello
Post by: Lithium on February 02, 2003, 05:48:09 AM
Code:
1 Msg$ = "0AAAA00AAAA00AAAA00000000AAAA00AAAA00000000AAAAA0AAAAA000AAA0AAAAA00000000AA0000AA0000AA0000AA0000AA0000AA0000000000AA0000AA0000AA0000AA00000000"
2 SCREEN 13
3 i = (i + 1) MOD 36
4 IF i = 0 AND (j + 1) = 4 THEN sz = RND * 16
5 IF i = 0 AND (j + 1) = 4 THEN clr = (TIMER * 32) MOD 255
6 IF i = 0 AND (j + 1) = 4 THEN ps = RND * 64000
7 IF i = 0 THEN j = (j + 1) MOD 4
8 IF MID$(Msg$, j * 36 + i + 1, 1) = "0" THEN LINE ((ps MOD 320) + (i MOD 6) * sz + j * (sz * 8), FIX(ps / 320) + FIX(i / 6) * sz)-STEP(sz, sz), clr, BF
9 IF INKEY$ = "" GOTO 3


yar

:rotfl:  i'm tired  :rotfl:


Title: Challenge....
Post by: relsoft on February 02, 2003, 06:13:22 AM
Finally!!!!!!

Now that Lith's here...

I wouldn't be surprised if we get to see the MMS and Bluecastle members posting here!!!

Yay!!! Keep it coming!!!!!

Dav: Would it be possible for me to make a zip of all these files along with the authors names and submit it to your site?


Title: Challenge....
Post by: Lithium on February 02, 2003, 07:01:35 AM
this is my last one for tonight

Code:
1 Smiley$ = "*+++,,,*+++,,,,,,,*++,,,,,,,,*+,,,,,,,,,*++,,,,,,,,,,*+,,,,,,,,,*,,,,,,,,,,*+,,,,,,,,,,,*++,,,,,,,,,,*+,,,,,,,,,*++,,,,,*+++,,,,,,,*+++,,,"
2 SCREEN 13
3 sz = ABS(SIN(TIMER)) * 10 + 3 ' sz = INT(ABS(SIN(TIMER)) * 10 + 3
4 ps = 0
5 i = (i + 1) MOD 224
6 IF (i = 0) AND (ps MOD 320 + int(sz) * 16) >= 320 THEN ps = (FIX(ps / 320) + int(sz) * 14) * 320 ELSE IF i = 0 THEN ps = ps + int(sz) * 16
7 LINE ((ps MOD 320) + (i MOD 16) * sz + j * (sz * 8), FIX(ps / 320) + FIX(i / 16) * sz)-STEP(sz, sz), ASC(MID$(Smiley$, i + 1, 1)), BF
8 IF (ps > 64000) AND (i = 0) THEN GOTO 3
9 IF INKEY$ = "" GOTO 5


zooming tiled smiley face

get rid of the flicker by adding an INT() around ABS(SIN(TIMER))*10+3, but that makes it jerky..


Title: Challenge....
Post by: ak00ma on February 02, 2003, 07:34:06 AM
Hey, this is my code. It's like a little smoother
Code:

1 SCREEN 13
2 DEF SEG = &HA000
3 FOR n& = 0 TO 65000
4  POKE n&, INT(RND * 256)
5 NEXT n&
6 FOR n& = 0 TO 64000
7  POKE n&, (PEEK(n& - 1) + PEEK(n&) + PEEK(n& + 1) + PEEK(n& + 320) + PEEK(n& - 320)) \ 5
8 NEXT n&
9 GOTO 6


Title: Challenge....
Post by: Antoni Gual on February 02, 2003, 09:01:14 AM
Lithium: Your smiley zoom is great!

While waiting for Nathan's fire...
Code:

'Lissajous by Antoni Gual
1 IF k = 0 THEN SCREEN 12 ELSE CLS
2 i& = (i& + 1) AND &HFFFFF
3 k = 6.3 * RND
4 l = 6.3 * RND
5 n% = (n% + 1) MOD 15
6 FOR j& = 0 TO 100000
7 PSET (320 + 300 * SIN(.01 * SIN(k) + j&), 240 + 200 * SIN(.01 * SIN(l) * j&)), n% + 1
8 NEXT
9 IF LEN(INKEY$) = 0 THEN GOTO 1



Title: Challenge....
Post by: Dav on February 02, 2003, 10:22:34 AM
Quote from: "relsoft"

Dav: Would it be possible for me to make a zip of all these files along with the authors names and submit it to your site?


Good idea!  Yes, please do. :)

- Dav


Title: Challenge....
Post by: toonski84 on February 02, 2003, 11:22:59 AM
well, here's a shot at 9-line fire, but i could only get it down to 10 lines.  if you dont mind bright, multicolored fire you can take  out the fire code.  and since it went super-slow on my 1.8gig, it's probably going to go even slower on other computers.

Code:

' 10 line fire by jofers
1 SCREEN 13
2 FOR i = 0 TO 255
3  PALETTE i, i \ 4
4 NEXT i
5 PSET (x, 199), CINT(RND) * 255
6 FOR i = 198 TO 100 STEP -1
7  PSET (x, i), (POINT(x, i + 1) + POINT(x + 1, i + 1) + POINT(x + 1, i - 1) + POINT(x, i) + POINT(x, i + 2)) / 5
8 NEXT i
9 x = (x + 1) MOD 320
10 IF INKEY$ = "" THEN GOTO 5


Title: Challenge....
Post by: toonski84 on February 02, 2003, 11:30:01 AM
never mind, i got it down to 9 :)

Code:

1 SCREEN 13
2 FOR a = 0 TO 255
3  PALETTE a, a \ 4
4 NEXT a
5 PSET (x, 199), CINT(RND) * 255
6 PSET (x, 198 - i), (POINT(x, 198 - i + 1) + POINT(x + 1, 198 - i + 1) + POINT(x + 1, 198 - i - 1) + POINT(x, 198 - i) + POINT(x, 198 - i + 2)) / 5
7 x = (x + 1) MOD 320
8 IF x = 0 THEN i = (i + 1) MOD 98
9 IF INKEY$ = "" THEN GOTO 5


Title: We need Balls to keep the pace of this challenge!
Post by: Antoni Gual on February 02, 2003, 12:47:43 PM
Code:

'balls by Antoni Gual    agual@eic.ictnet.es
1  IF p% >= 16 THEN 3 ELSE IF p% = 0 THEN SCREEN 12 ELSE PALETTE p% - 1, b&
2  READ p%, b&
3  IF p% < 16 THEN GOTO 9 ELSE a$ = MKI$(RND * 640 + 1) + MKI$(RND * 480) + MKS$((RND * 60) + 20) + MKI$(INT(RND * 4) * 4) + MKS$(RND * 3.141592) + MKS$(RND * 3.141592 / 1.5)
4 FOR i% = -INT(CVS(MID$(a$, 5))) TO INT(CVS(MID$(a$, 5)))
5  FOR j% = -INT(SQR(CVS(MID$(a$, 5)) ^ 2 - i% ^ 2)) TO INT(SQR(CVS(MID$(a$, 5)) ^ 2 - i% ^ 2))
6   c! = 3 * (COS(CVS(MID$(a$, 11))) * SIN(CVS(MID$(a$, 15))) * i% / CVS(MID$(a$, 5)) + SIN(CVS(MID$(a$, 11))) * SIN(CVS(MID$(a$, 15))) * j% / CVS(MID$(a$, 5)) + COS(CVS(MID$(a$, 15))) * SQR(1.11 - (i% / CVS(MID$(a$, 5))) ^ 2 - (j% / CVS(MID$(a$, 5) _
)) ^ 2))
7   PSET (CVI(MID$(a$, 1)) + i%, CVI(MID$(a$, 3)) + j%), 1 + CVI(MID$(a$, 9)) + INT(c!) + (RND > (c! - INT(c!)))
8 NEXT j%, i%
9 IF LEN(INKEY$) = 0 THEN GOTO 1 ELSE DATA 1,&h5,2,&h10,3,&h20,4,&h30,5,&h500,6,&h1000,7,&h2000,8,&h3000,9,&h50000,10,&h100000,11,&h200000,12,&h300000,13,&h50505,14,&h101010,15,&h202020,16,&h303030,17,0


Title: Challenge....
Post by: toonski84 on February 02, 2003, 01:14:07 PM
egad.  this filler challenge has become quite a phenomena.  i dont think toshi's had this many entry (well, after the fourth one that happened but you get the idea)


Title: Bouncing balls!
Post by: Lithium on February 02, 2003, 03:57:03 PM
Code:
1 SCREEN 13
2 DIM ballx(50), bally(50), ballxv(50), ballyv(50)
3 i = (i + 1) MOD 50
4 IF ballx(i) = 0 THEN ballx(i) = RND * 320 ELSE IF bally(i) = 0 THEN bally(i) = RND * 320
5 IF ballxv(i) = 0 THEN ballxv(i) = RND * 10 - 5 ELSE IF ballyv(i) = 0 THEN ballyv(i) = RND * 10 - 5
6 IF (ballx(i) >= 320 AND ballxv(i) > 0) OR (ballx(i) <= 1 AND ballxv(i) < 0) THEN ballxv(i) = -ballxv(i) ELSE ballx(i) = ballx(i) + ballxv(i)
7 IF (bally(i) >= 200 AND ballyv(i) > 0) OR (bally(i) <= 1 AND ballyv(i) < 0) THEN ballyv(i) = -ballyv(i) ELSE bally(i) = bally(i) + ballyv(i)
8 CIRCLE (ballx(i), bally(i)), (TIMER / 16) MOD (i + 1), i MOD 15 + 16
9 IF INKEY$ = "" THEN GOTO 3

 :bounce:  :bounce:  :bounce:  :bounce:


Title: Challenge....
Post by: Dav on February 02, 2003, 04:28:37 PM
A cheap-o way to do a cheap-o fire effect in 8 lines.

Code:

1 FOR t = -1 TO 64
2   IF t = -1 THEN SCREEN 13 ELSE IF t = 64 THEN LINE (0, 189)-(319, 199), 60, BF ELSE PALETTE t, t
3 NEXT
4 FOR y% = 169 TO 189
5 FOR x% = 0 TO 319
6 IF x% = 319 AND y% = 189 THEN GOTO 4 ELSE c% = POINT(x%, y%) - RND * 8
7 IF c% >= 0 THEN PSET (x%, y% - 1), c% ELSE IF INKEY$ <> "" THEN END
8 NEXT x%, y%


You could change it easy to fill up the screen, but it would soooo slow.

Change the 169 in line 4 to a lower number, and the * 8 in line 6 to a lower number as well.

- Dav


Title: Challenge....
Post by: toonski84 on February 02, 2003, 07:07:09 PM
if/then/else is *such* a cheap hack :P  but it's definately faster than mine...


Title: rotozoomer
Post by: Generic on February 02, 2003, 09:49:22 PM
Ack, guys, I just couldn't help myself...

6-line Rotozoomer:

Code:

SCREEN 13
1  ang = ang + .08725
scale = scale + (SGN(SIN(ang)) / 10)
2 p& = (p& + 1) AND 65535
PSET (p& MOD 320, (p& - (p& MOD 320)) \ 320), (((((p& MOD 320) - 160) * COS(ang) - (((p& - (p& MOD 320)) / 320) - 100) * SIN(ang)) * scale) AND 63) OR ((((((p& - (p& MOD 320)) / 320) - 100) * COS(ang) + ((p& MOD 320) - 160) * SIN(ang)) * scale) AND  _
63)
IF p& = 65535 THEN GOTO 1 ELSE GOTO 2


Meh, could be a lot better. Maybe someone should do a text-mode version :)


Title: Challenge....
Post by: toonski84 on February 02, 2003, 10:12:23 PM
text mode graphic demos are always fun :)

here, i seriously cleaned up my fire demo, and it runs a bajillion (i've confirmed this with tests) times faster.  no funky tricks either

Code:

1 SCREEN 13
2 FOR x% = 0 TO 127
3 PALETTE x%, x% \ 2
4 NEXT x%
5 DEF SEG = &HA7D0
6 FOR x% = 31999 TO 0 STEP -1
7 IF x% >= 31680 THEN POKE x%, CINT(RND * 127) ELSE POKE x%, (PEEK(x% + 320) + PEEK(x% + 319) + PEEK(x% + 321) + PEEK(x%) + PEEK(x% + 640)) \ 5
8 NEXT x%
9 IF INKEY$ = "" THEN GOTO 5


Title: Challenge....
Post by: Dav on February 03, 2003, 12:58:38 AM
Cool one! :)

- Dav


Title: Heh
Post by: Nexinarus on February 03, 2003, 02:18:45 AM
Im trying to make a decent one, my first one (7 lines) is funny lol, it sucks i think.. quite random.. im not gonna post it ;).

(DAMNIT) Whats left to make? someone gimmi an idea?

(edit).. I decided to make a 3d rotating pyramid, LOL, here it (hopefully) is:
(edit).. Damnit i mistyped a number, oops, now it works.

Code:

1 SCREEN 13
2 LINE (160, 90)-((SIN(((TIMER * 10) MOD 360) * 3.1415 / 180) * 150) / (COS(((TIMER * 10) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 160, 50 / (COS(((TIMER * 10) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 150)
3 LINE (160, 90)-((SIN(((((TIMER * 10) MOD 360) + 120) MOD 360) * 3.1415 / 180) * 150) / (COS(((((TIMER * 10) MOD 360) + 120) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 160, 50 / (COS(((((TIMER * 10) MOD 360) + 120) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 150)
4 LINE (160, 90)-((SIN(((((TIMER * 10) MOD 360) + 240) MOD 360) * 3.1415 / 180) * 150) / (COS(((((TIMER * 10) MOD 360) + 240) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 160, 50 / (COS(((((TIMER * 10) MOD 360) + 240) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 150)
5 LINE ((SIN(((((TIMER * 10) MOD 360) + 120) MOD 360) * 3.1415 / 180) * 150) / (COS(((((TIMER * 10) MOD 360) + 120) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 160, 50 / (COS(((((TIMER * 10) MOD 360) + 120) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 150)-((SIN(((TIMER * 10) MOD 360) * 3.1415 / 180) * 150) / (COS(((TIMER * 10) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 160, 50 / (COS(((TIMER * 10) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 150)
6 LINE -((SIN(((((TIMER * 10) MOD 360) + 240) MOD 360) * 3.1415 / 180) * 150) / (COS(((((TIMER * 10) MOD 360) + 240) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 160, 50 / (COS(((((TIMER * 10) MOD 360) + 240) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 150)
7 LINE -((SIN(((((TIMER * 10) MOD 360) + 120) MOD 360) * 3.1415 / 180) * 150) / (COS(((((TIMER * 10) MOD 360) + 120) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 160, 50 / (COS(((((TIMER * 10) MOD 360) + 120) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 150)
8 CLS
9 GOTO 2


Title: Challenge....
Post by: relsoft on February 03, 2003, 03:35:59 AM
Kewl!!!!!

I have made 3 fx here last night.

1. A 3d(no hacks) rotating sphere

2. a rotozoomer(but Generic beat me to it)

3. A raycaster..... Yes, but its still 13 lines long. :*(

Here's the 3d rotator. I could add some camera action but its slow already...


Code:


'Relsoft presents.... The Sphere 2003
'Could've made this 7 lines but darn QB!!! it won't let me cut 'n paste
'properly... ;*(

1 IF RotX = 0 THEN SCREEN 12 ELSE A! = (A! + .04) * -(A! < 6.283186)
2 FOR S% = 1 TO 11
3 FOR P% = 1 TO 20
4 RotX! = (((140 * SIN(3.141593 / 11 * S%) * SIN(6.283186 / 20 * P%))) * (COS(A!) * COS(A!)) + ((140 * SIN(3.141593 / 11 * S%) * COS(6.283186 / 20 * P%))) * (COS(A!) * -SIN(A!) + SIN(A!) * SIN(A!) * COS(A!)) + ((140 * COS(3.141593 / 11 * S%))) * (- _
SIN(A!) * -SIN(A!) + COS(A!) * SIN(A!) * COS(A!)))
5 RotY! = (((140 * SIN(3.141593 / 11 * S%) * SIN(6.283186 / 20 * P%))) * (COS(A!) * SIN(A!)) + ((140 * SIN(3.141593 / 11 * S%) * COS(6.283186 / 20 * P%))) * (COS(A!) * COS(A!) + SIN(A!) * SIN(A!) * SIN(A!)) + ((140 * COS(3.141593 / 11 * S%))) * (- _
SIN(A!) * COS(A!) + COS(A!) * SIN(A!) * SIN(A!)))
6 IF ((((140 * SIN(3.141593 / 11 * S%) * SIN(6.283186 / 20 * P%))) * (-SIN(A!)) + ((140 * SIN(3.141593 / 11 * S%) * COS(6.283186 / 20 * P%))) * (SIN(A!) * COS(A!)) + ((140 * COS(3.141593 / 11 * S%))) * (COS(A!) * COS(A!)))) <= 0 THEN PSET ((256 *  _
RotX! / (256)) + 320, -(256 * RotY! / (256)) + 240), ((S% + P%) AND 15) + 1
7 NEXT P%, S%
8 LINE (0, 0)-(639, 479), 0, BF
9 IF INKEY$ = "" THEN 1



B4 I go, it has hidden face removal....

:*)


Title: 3d rotating cube, in 8 lines, suck this =)
Post by: Nexinarus on February 03, 2003, 07:36:31 AM
My 3d rotating cube (with bs's help)

NOTE: Please copy into notepad and save as a bas file, then load into qb (1.1, 4.5, 7.1, it shouldnt matter).

edit: this is the improved version by BinarySHOCK who made it not flicker heh.
Code:
1 SCREEN 7, 0, 1, 0
2 FOR a = 0 TO 3
3 LINE ((SIN(((TIMER * 20 + a * 90) MOD 360) * 3.1415 / 180) * 150) / (COS(((TIMER * 20 + a * 90) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 160, 50 / (COS(((TIMER * 20 + a * 90) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 150)-((SIN(((TIMER * 20 + _
 a * 90 + 90) MOD 360) * 3.1415 / 180) * 150) / (COS(((TIMER * 20 + a * 90 + 90) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 160, 50 / (COS(((TIMER * 20 + a * 90 + 90) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 150)
4 LINE ((SIN(((TIMER * 20 + a * 90) MOD 360) * 3.1415 / 180) * 150) / (COS(((TIMER * 20 + a * 90) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 160, -100 / (COS(((TIMER * 20 + a * 90) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 150)-((SIN(((TIMER * 20 _
 + a * 90 + 90) MOD 360) * 3.1415 / 180) * 150) / (COS(((TIMER * 20 + a * 90 + 90) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 160, -100 / (COS(((TIMER * 20 + a * 90 + 90) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 150)
5 LINE ((SIN(((TIMER * 20 + a * 90) MOD 360) * 3.1415 / 180) * 150) / (COS(((TIMER * 20 + a * 90) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 160, 50 / (COS(((TIMER * 20 + a * 90) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 150)-((SIN(((TIMER * 20 + _
 a * 90) MOD 360) * 3.1415 / 180) * 150) / (COS(((TIMER * 20 + a * 90) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 160, -100 / (COS(((TIMER * 20 + a * 90) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 150)
6 NEXT
7 PCOPY 1, 0
8 CLS
9 IF INKEY$ = "" THEN GOTO 2


this is the version with no pcopy and is VERY flickery, but 1 line smaller =).
Code:
1 SCREEN 13
2 FOR a = 0 TO 3
3 LINE ((SIN(((TIMER * 20 + a * 90) MOD 360) * 3.1415 / 180) * 150) / (COS(((TIMER * 20 + a * 90) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 160, 50 / (COS(((TIMER * 20 + a * 90) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 150)-((SIN(((TIMER * 20 + _
 a * 90 + 90) MOD 360) * 3.1415 / 180) * 150) / (COS(((TIMER * 20 + a * 90 + 90) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 160, 50 / (COS(((TIMER * 20 + a * 90 + 90) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 150)
4 LINE ((SIN(((TIMER * 20 + a * 90) MOD 360) * 3.1415 / 180) * 150) / (COS(((TIMER * 20 + a * 90) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 160, -100 / (COS(((TIMER * 20 + a * 90) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 150)-((SIN(((TIMER * 20 _
 + a * 90 + 90) MOD 360) * 3.1415 / 180) * 150) / (COS(((TIMER * 20 + a * 90 + 90) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 160, -100 / (COS(((TIMER * 20 + a * 90 + 90) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 150)
5 LINE ((SIN(((TIMER * 20 + a * 90) MOD 360) * 3.1415 / 180) * 150) / (COS(((TIMER * 20 + a * 90) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 160, 50 / (COS(((TIMER * 20 + a * 90) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 150)-((SIN(((TIMER * 20 + _
 a * 90) MOD 360) * 3.1415 / 180) * 150) / (COS(((TIMER * 20 + a * 90) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 160, -100 / (COS(((TIMER * 20 + a * 90) MOD 360) * 3.1415 / 180) * 40 + 150) * 64 + 150)
6 NEXT
7 CLS
8 IF INKEY$ = "" THEN GOTO 2


Title: Pixel Scrolling Pattern
Post by: BinarySHOCK on February 03, 2003, 08:23:00 AM
umm ya just like it sayz... not very good but i'm bored so ya...

1 SCREEN 13
2 DEFINT A-Z
3 FOR Ix = 0 TO 319
4      FOR Iy = 0 TO 199
5           PSET (Ix, Iy), ((Ix - L) XOR (Iy + L)) * 2
6      NEXT Iy, Ix
7      L = (L + 1) AND 255
8      PALETTE L, (255 - L) \ 4
9 IF INKEY$ = "" THEN 3


Title: Another 1
Post by: BinarySHOCK on February 03, 2003, 09:01:24 AM
This 1 looks really stupid for a few seconds until the palette gets fully changed  :P  so please wait for that..


1 SCREEN 13
2 DEFINT A-Z
3 FOR Ix = 0 TO 319
4FOR Iy = 0 TO 199
5 PSET (Ix, Iy), ((Ix - L) XOR (Iy + L)) Xor ((Ix + L) XOR (Iy - L))
6NEXT Iy, Ix
7L = (L + 1) AND 255
8PALETTE L, (255 - L) \ 4
9 IF INKEY$ = "" THEN 3


Title: Challenge....
Post by: toonski84 on February 03, 2003, 09:04:02 AM
on the contrary, the palette transformation looks pretty cool :D


Title: Challenge....
Post by: Agamemnus on February 03, 2003, 09:51:00 AM
Nexinarius, it doesn't paste that because it's above the 256 line limit.  :???: Manual copy?

(edit) Can you make the sphere bounce around, Rel? You can save 1 line by using a string instead of a variable...

You can also save a line by converting the FORs to string addition.. MAYBE.

I like dat first one a lot BinaryShock. :)

For the second one the palette transformation is a bit too.. dramatic. I changed it a little, but it's 11 lines. :(

[code]
1  SCREEN 13
2  DEFINT A-Z
3  L = (L + 1) AND 255
4  PALETTE L, (255 - L) \ 4
5  IF L = 0 THEN GOTO 6 ELSE GOTO 3
6  FOR ix = 1 TO 399
7  FOR iy = 1 TO 199
8  PSET (ix, iy), ((ix - L) XOR (iy + L)) XOR ((ix + L) XOR (iy - L))
9  NEXT iy, ix
10 L = (L + 1) AND 255
11 IF INKEY$ <> "" THEN SCREEN 0 ELSE GOTO 6
[code]


Title: Fire, 8 lines
Post by: BinarySHOCK on February 03, 2003, 10:10:26 AM
1 SCREEN 13
2 FOR Iy% = 199 TO 170 STEP -1
3     IF (POINT(Ix%, Iy%) + POINT(Ix% - 1, Iy%) + POINT(Ix% + 1, Iy%) + POINT(Ix%, Iy% - 1) + POINT(Ix%, Iy% + 1)) > 10 THEN PSET (Ix%, Iy% - 1), (POINT(Ix%, Iy%) + POINT(Ix% - 1, Iy%) + POINT(Ix% + 1, Iy%) + POINT(Ix%, Iy% - 1) + POINT(Ix%, Iy% + 1 _
)) \ 5 - 2
4 NEXT
5 IF INT(RND * 2) = 1 THEN PSET (Ix%, 199), 255 ELSE PSET (Ix%, 199), 0
6 Ix% = (Ix% + 1) MOD 320
7 PALETTE Ix% AND 255, (Ix% AND 255) \ 4
8 IF LEN(INKEY$) = 0 THEN 2

heh incase you didn't kno, all that point stuff needs to be on 1 line :P if you remove the PALETTE it would be in 7, but then it looks kinda umm ya not like fire.

thank you, agamenus.


Title: Challenge....
Post by: Dav on February 03, 2003, 02:37:19 PM
Had some more time to waste and make something.

I'm not sure where I got the idea for this one.  It's nothing special -- but I did try to avoid the so called cheap hacks for once.  Makes it more challenging(sic?) to come up with something decent.

A rainbow-paint-spray-runner-type of thing...

Code:

1 SCREEN 13
2 x% = RND * 320
3 y% = RND * 200
4 w% = INT(RND * 2) + 1
5 c% = INT(RND * 2) - 1
6 IF c% = 0 THEN c% = 1
7 IF w% = 1 THEN x% = x% + c% ELSE y% = y% + c%
8 IF INKEY$ = "" THEN PSET (x%, y%), 15 + y% + INT(RND * 6) ELSE END
9 IF x% < 1 OR y% < 1 OR x% > 320 OR y% > 200 THEN GOTO 2 ELSE GOTO 4


Title: Challenge....
Post by: Nexinarus on February 03, 2003, 03:34:35 PM
Ok, Agamemnus, try:
-copying the text to windows clipboard
-paste it into notepad and save as a bas file
-now it should run fine, i just tested it on qb4.5 and it worked. (yea the lines are massive lol, its the only way i could think of :p


Title: Challenge....
Post by: Antoni Gual on February 03, 2003, 05:47:59 PM
Binary Shock: Fine XOR effects! The second one is just incredible!

Rel: Incedible sphere! Do you really have a raycaster in 13 lines? Post it please......

Dav: I like these "handcrafted" textures. A very fine effect  

Generic: Excuse me, i could not resist the temptation :)

Code:

' OPTIMIZED  :) rotozoomer in 9 lines by Antoni Gual
1 SCREEN 13
2 ANG = ANG + .08
3 CS% = COS(ANG) * ABS(SIN(ANG)) * 128
4 ss% = SIN(ANG) * ABS(SIN(ANG)) * 128
5 FOR Y% = -100 TO 99
6 FOR X% = -160 TO 159
7 PSET (X% + 160, Y% + 100), (((X% * CS% - Y% * ss%) AND (Y% * CS% + X% * ss%)) \ 128)
8 NEXT X%, Y%
9 IF LEN(INKEY$) = 0 THEN 2

 :bounce:


Title: Am I becoming blind?
Post by: Antoni Gual on February 03, 2003, 06:09:38 PM
Is Rel's sphere program is hiding points in the back face?...:o

Ok, I think we should all give up...:cry: You are the winner, Rel!

But I will continue sending progs just for fun!  :bounce:


Title: Challenge....
Post by: Dav on February 03, 2003, 07:49:57 PM
Probably my last one for a while...

I was messing with the blue ball saver, resulting in these weird, warped green space gems...

Code:

1  FOR a = -1 TO 63
2    IF a = -1 THEN SCREEN 13 ELSE PALETTE a, a * 256
3  NEXT
4  x% = INT(RND * 320)
5  y% = INT(RND * 200)
6  FOR z% = RND * 63 + 1 TO 1 STEP -1
7    IF INKEY$ = "" THEN CIRCLE (x%, y%), z%, -z% + 64, , , INT(RND * 320) * RND * .1 ELSE END
8    IF z% > 1 THEN PAINT (x%, y%), -z% + 64 ELSE GOTO 4
9  NEXT


- Dav


Title: Challenge....
Post by: toonski84 on February 03, 2003, 10:12:32 PM
be careful what you wish for, generic... i've modified my fire to work in text mode :)

Code:
1 OUT &H3C8, 0
2 FOR i = 0 TO 18
3 IF i = 18 THEN CLS  ELSE IF i MOD 3 = 0 THEN OUT &H3C9, (i \ 3) * 10 ELSE OUT &H3C9, 0
4 NEXT i
5 DEF SEG = &HB800
6 FOR x% = 3999 TO 2080 STEP -2
7 IF x% > 3840 THEN POKE x%, CINT(RND) * 80 ELSE POKE x%, ((PEEK(x% + 160) + PEEK(x% + 162) + PEEK(x% + 158) + PEEK(x% + 320) * 1.2) / 5)
8 NEXT
9 IF INKEY$ = "" THEN GOTO 5


dav, i've learned cheap hacks are a good thing :)


Title: Challenge....
Post by: BinarySHOCK on February 04, 2003, 12:18:03 AM
agamemnus: i agree about the palette transformation, but i couldn't think of a way to keep it under 9 lines any other way :(

toonski84: text mode fire heh really cool ;) i'd like to see some text mode plasma if any1's up to the challenge.

rel: *please* post that raycaster!

heh this has been the most fun i've had in a while.


Title: Challenge....
Post by: toonski84 on February 04, 2003, 12:21:51 AM
i think i had some non-nine-line text-mode plasma on my hd that someone made.  i'll check it out tomorrow.


Title: Challenge....
Post by: BinarySHOCK on February 04, 2003, 12:45:03 AM
ya i've got a copy of that 2, heh it's really cool :P


Title: Challenge....
Post by: westie on February 04, 2003, 01:15:07 AM
SCREEN 13
DO
PSET (RND * 400, RND * 400), 10
LOOP UNTIL INKEY = "Q"

CTRL + SHIFT + BREAK to exit


just a quicky


Title: Challenge....
Post by: BinarySHOCK on February 04, 2003, 02:46:13 AM
SCREEN 13
DO
    LINE -(RND * 319, RND * 199), INT(RND * 15) + 1
    FOR I = 0 TO 5
         WAIT 986, 8
         WAIT 986, 8, 8
    NEXT
LOOP Until Len(Inkey$)

oh ya time to go old sk00l  hehe :)
if it runs way to slow just umm adjust the I for-loop


Title: Challenge....
Post by: toonski84 on February 04, 2003, 03:49:33 AM
hey, who here likes spirographs?

Code:

1 SCREEN 12
2 RANDOMIZE TIMER
3 vars& = (INT(RND * 99) + 1) * 10000 + (INT(RND * 99) + 1) * 100 + (INT(RND * 99) + 1)
4 FOR t = 0 TO 100 STEP .1
5 LINE -((((vars& \ 100) MOD 100) + (vars& \ 10000)) * COS(t) - ((vars& \ 10000) + (vars& MOD 100)) * COS(((((vars& \ 100) MOD 100) + (vars& \ 10000)) / (vars& \ 10000)) * t) + 320, (((vars& \ 100) MOD 100) + (vars& \ 10000)) * SIN(t) - ((vars& \  _
10000) + (vars& MOD 100)) * SIN(((((vars& \ 100) MOD 100) + (vars& \ 10000)) / (vars& \ 10000)) * t) + 240)
6 NEXT t
7 SLEEP 1
8 CLS
9 IF INKEY$ <> "q" THEN GOTO 2


Title: Re: Am I becoming blind?
Post by: relsoft on February 04, 2003, 04:00:24 AM
Quote from: "Antoni Gual"
Is Rel's sphere program is hiding points in the back face?...:o

Ok, I think we should all give up...:cry: You are the winner, Rel!

But I will continue sending progs just for fun!  :bounce:


Yeah, it hides teh points in the back-face but the hack I made would only work on spherical figures and the like.

Bah!!! Nothing beats yer floormapper!!!!

Nother one...

Code:


'3d vortex......2003
'Http://Relsoft.Ath.cx
'Here's my take on the starfield stuff...


1 IF I% = 0 THEN SCREEN 13 ELSE DIM Dist!(200), Rot!(200)
2 I% = (I% + 1) MOD 200
3 IF J% < 257 THEN J% = (J% + 1)
4 PSET (Dist!(I%) * COS(Rot!(I%) / 56.32716) + 160, Dist!(I%) * SIN(Rot!(I%) / 56.32716) + 100), 0
5 Rot!(I%) = (Rot!(I%) + .5 * (Dist!(I%) / 50)) * -(Rot!(I%) <= 360)
6 IF Dist!(I%) < 0 OR Dist!(I%) > 170 THEN Rot!(I%) = RND * 360
7 IF Dist!(I%) < 0 OR Dist!(I%) > 170 THEN Dist!(I%) = RND * 170 ELSE Dist!(I%) = Dist!(I%) - (2 - (Dist!(I%) / 150))
8 IF J% > 255 THEN PSET (Dist!(I%) * COS(Rot!(I%) / 56.32716) + 160, Dist!(I%) * SIN(Rot!(I%) / 56.32716) + 100), Dist!(I%) + 50 ELSE PALETTE J%, 65536 * (J% \ 4) + 256 * (J% \ 4) + (63 - (J% \ 4))
9 IF INKEY$ = "" THEN 2





It's a 3d blackhole!!!


Title: Challenge....
Post by: relsoft on February 04, 2003, 04:02:57 AM
Yet another one...

Code:


'Colors galore!!!!
'http://Relsoft.ath.cx
'borrowed Narf's Out4pal hack!!!

1 RANDOMIZE TIMER
2 IF dir% = 0 THEN SCREEN 13 ELSE i& = (i& + 1) AND &H7FFFFFFF
3  dir% = 1 + INT(RND * 4)
4  IF dir% = 1 THEN y% = y% - (-(dir% = 1)) * -(y% > 0) ELSE y% = y% + (-(dir% = 3)) * -(y% < 200)
5  IF dir% = 2 THEN x% = x% - (-(dir% = 2)) * -(x% > 0) ELSE x% = x% + (-(dir% = 4)) * -(x% < 320)
6 IF (i& AND 1) = 0 THEN LINE (x%, y%)-(x% + (dir% = 2), y% + (dir% = 1)), POINT(x%, y%) + 1 ELSE LINE (320 - x%, 200 - y%)-(320 - x% + (dir% = 4), 200 - y% + (dir% = 3)), POINT(320 - x%, 200 - y%) + 1
7 IF (i& AND 1) = 0 THEN LINE (320 - x%, y%)-(320 - x% + (dir% = 2), y% + (dir% = 1)), POINT(320 - x%, y%) + 1 ELSE LINE (x%, 200 - y%)-(x% + (dir% = 4), 200 - y% + (dir% = 3)), POINT(x%, 200 - y%) + 1
8 OUT (&H3C9 + ((i& AND 3) = 0)), (((i& AND 3) = 0) * -((i& \ 4) AND 255)) - (((i& AND 3) <> 0) * 31) - ((((i& AND 3) <> 0) * 31) * SIN((((i& \ 4) AND 255) + (((i& AND 3) - 1) * 85) + 200 * SIN((i& \ 1024) / (81 - (10 * (i& AND 3))))) * 3.1415926# / _
 64))
9 IF INKEY$ = "" THEN 2




BTW, I have that raycaster but its in 13 lines... I won't have time to edit it until Saturday but I will post it here Saturday...

More to come later....


Title: James Bond style
Post by: Ichiban_Addict on February 04, 2003, 04:31:50 AM
Hey, here's an attempt at the Jame's Bond death sequence  :P

Code:
 
1 SCREEN 13
2 DEFINT A-Z
3 LINE (0, 0)-(319, 0), 4
4 FOR j = 1 TO 200
5 FOR i = 0 TO 319
6 IF INT(RND * 5) = 0 AND POINT(i, j - 2) THEN LINE (i - 90 / j, j - 1)-(i + 90 / j, j - 1), 4
7 NEXT i
8 NEXT j
9 GOTO 4  

Ichiban_Addict
AKA Jake                                                        


Title: Challenge....
Post by: relsoft on February 04, 2003, 04:41:12 AM
Great!!!!

the MMS members are active again!!!!


Title: weird pinwheel
Post by: Ichiban_Addict on February 04, 2003, 05:16:51 AM
Hey again...this ones just a bunch of rotating points, i wouldnt recommend looking at it for too long  :D
Code:

1 SCREEN 13
2 angle = angle + 1
3 IF angle = 360 THEN angle = 0
4 xy = xy + .09'RND * .5
5 PSET (160 + COS(angle) * xy - SIN(angle) * xy, 100 + SIN(angle) * xy + COS(angle) * xy), RND * 2
6 PSET (160 + COS(360 - angle) * xy - SIN(360 - angle) * xy, 100 + SIN(360 - angle)  * xy + COS(360 - angle) * xy), RND * 4 + 2
7 IF xy > 160 THEN xy = 0
8 IF xy = 0 THEN LINE (0, 0)-(319, 199), 0, BF
9 GOTO 2


Title: Challenge....
Post by: Dav on February 04, 2003, 02:04:33 PM
Man, all you guys are posting some great stuff!

This one gives the effect of a scrolling screen (it's not really).
Scrolls up and down randomly.

Code:

'Fake screen scrolling in 9 lines by Dav
'Scrolls up and down randomly
1 SCREEN 13
2 w% = RND * 1
3 IF w% = 0 THEN a$ = MKI$(199) + MKI$(0) + MKI$(-1) + MKI$(RND * 100 + 1) ELSE a$ = MKI$(0) + MKI$(199) + MKI$(1) + MKI$(RND * 100 + 1)
4 FOR t% = 1 TO CVI(MID$(a$, 7, 2))
5 FOR y% = CVI(MID$(a$, 1, 2)) TO CVI(MID$(a$, 3, 2)) STEP CVI(MID$(a$, 5, 2))
6 IF INKEY$ = "" THEN LINE (0, y%)-(319, y%), c% ELSE END
7 IF w% = 0 THEN IF c% > 199 THEN c% = 0 ELSE c% = c% + 1 ELSE IF c% < 0 THEN c% = 199 ELSE c% = c% - 1
8 IF t% = CVI(MID$(a$, 7, 2)) THEN GOTO 2
9 NEXT y%, t%


- Dav


Title: Challenge....
Post by: mofu on February 04, 2003, 07:27:44 PM
k guys dont laugh, I am a total newbie. I just started learning qb again!!! tonight. I felt like posting something even though a 2 year old could probably write this piece of code :oops:

Quote

1: SCREEN 13
2: DO
3: RANDOMIZE TIMER
4: a = INT(RND * 320)
5: b = INT(RND * 200)
6: FOR i = 0 TO 200
7: LINE (a, b)-(a, b), INT(RND * 14) + 1
8: NEXT i
9: LOOP UNTIL INKEY$ = CHR$(27)


easy I know, but Im a newbie :D
cheers


Title: Challenge....
Post by: mofu on February 04, 2003, 07:57:42 PM
k guys,
heres a better attempt at mt first one :D  :D  :D
I think im getting better already :wink:
Quote

1: SCREEN 13
2: c = 1
3: DO
4: FOR i = 0 TO 10
5: CIRCLE (160, 100), c, INT(RND * 14) + 1
6: NEXT i
7: c = c + 1
8: IF c = 200 THEN c = 1
9: LOOP UNTIL INKEY$ = CHR$(27)


cheers


Title: Challenge....
Post by: na_th_an on February 04, 2003, 09:45:23 PM
At last our entry (Na Than+Phobeous)

This comes out of a full-screen fire. You can see it now inside a small box just for speed issues. It is, of course, out of contest 'cause it has 11 lines. We couldn't shrink it any more. Anyways, the *real* effect takes 8 lines, but 3 are needed to set up the palette.

Code:
' Convolution Fire by WOPR2k
' In fact this effects takes 8 lines, but the palette rutines took 3 lines
' (It looks like crap without the custom palette).

' NOTE: ** DON'T ** use copy and paste to QB in a DOS box, 'cause there
' are split lines. Copy to notepad and save it as a .BAS file.

1 IF c& = 0 THEN SCREEN 13 ELSE IF c& = 1 THEN PAINT (0, 0), 255 ELSE IF c& = 2 THEN DIM Sc%(2049) ELSE IF c& = 3 THEN LINE (128, 136)-(191, 199), 0, BF ELSE IF c& = 4 THEN s% = VARPTR(Sc%(0)) ELSE IF c& = 5 THEN DEF SEG = VARSEG(Sc%(0)) ELSE GET ( _
128, 136)-(191, 199), Sc%(0)
  IF c& < 63 THEN b% = b% + 1 ELSE IF c& < 126 THEN g% = g% + 1 ELSE IF c& < 189 THEN r% = r% + 1
  IF c& < 256 THEN PALETTE c&, 63 - r% + (63 - g%) * 256! + (63 - b%) * 65536!
  c& = c& + 1
2 IF c& > 4 THEN POKE VARPTR(Sc%(0)) + 4 + 62 * 64 + INT(RND * 64), 255
3 FOR i% = 1 TO 62
4 FOR j% = 1 TO 62
5 p% = (PEEK(s% + 4 + 64 * i% + j%) + PEEK(s% + 4 + 64 * (i% - 1) + j%) + PEEK(s% + 5 + 64 * (i% - 1) + j%) + PEEK(s% + 5 + 64 * i% + j%) + PEEK(s% + 4 + 64 * (i% + 1) + j% + 1) + PEEK(s% + 4 + 64 * (i% + 1) + j%) + PEEK(s% + 3 + 64 * (i% + 1) + j%) _
 + PEEK(s% + 3 + 64 * i% + j%) + PEEK(s% + 3 + 64 * (i% - 1) + j%)) \ 8
6 IF p% < 256 THEN PSET (128 + j%, i% + 135), p% ELSE PSET (128 + j%, i% + 135), 255
7 NEXT j%, i%
8 IF INKEY$ = "" THEN GOTO 1

' Unreadable code.


Enjoy ;) . The 'c' version that I posted a couple of days ago really looks like fire, mainly because it goes faster ;). We coded that version 2 years ago.

The effect is based upon a per-pixel convolution and a feedback. The convolution matrix is:

Code:
   (1 1 1)
1/8*(1 1 1)
    (1 1 1)


Once the convolution matrix is applied, the resulting image is output to screen and then copied over the original, but shifting it one pixel up, and so on.


Title: Challenge....
Post by: Nexinarus on February 05, 2003, 12:29:16 AM
Woah na_th_an thats pretty cool fire. /me votes nathan's fire the best so far heh.

Also funny one jake heh.


Title: Challenge....
Post by: BinarySHOCK on February 05, 2003, 01:20:08 AM
1 SCREEN 13
2 DIM Temp%(51)
3 X% = INT(RND * 310)
4 Y% = INT(RND * 189)
5 IF G& < 10000 THEN CIRCLE (RND * 319, RND * 199), 10, RND * 15 + 16
6 IF G& AND 7 THEN GET (X%, Y%)-(X% + 9, Y% + 9), Temp%
7 IF G& AND 7 THEN PUT (X%, Y% + 1), Temp%, PSET
8 G& = (G& + 1) MOD 64000
9 IF LEN(INKEY$) = 0 THEN 3

screen melting... yup..

and ya i agree that is cool fire.


Title: Challenge....
Post by: BinarySHOCK on February 05, 2003, 02:03:13 AM
Here's my final entry i think :P
not quite a screen saver, it's a 9 line pong game, heh hacked to hell but ya :P anywayz i uploaded it, you can download it from http://www25.brinkster.com/darksoftware/9linep.bas here.

flickery as hell, but you'll live :P and no 'computer' to go against it's just you against the ball (and the flicker :P)

(you may have to right click and save target as to download it)


Title: Challenge....
Post by: relsoft on February 05, 2003, 02:03:40 AM
Bouncing Spheremaped ball...

Code:


'"The Lens" by Relsoft
'Relsoft.ath.cx
1 SCREEN 13
2 IF xx% = 0 THEN xx% = 3 + INT(RND * 260) ELSE IF xv% = 0 THEN xv% = -1 + INT(RND * 2)
3 IF (xx% <= 1 AND xv% < 0) OR (xx% >= 319 AND xv% > 0) THEN xv% = -xv% ELSE xx% = xx% + xv%
4 yy% = 100 - ABS(SIN(((xx% * 3) * 3.141593 / 180))) * 160
5 FOR yt% = 0 TO 99
6 FOR xt% = 0 TO 99
7 IF (((xt% - 50) * (xt% - 50)) + ((yt% - 50) * (yt% - 50))) < (2500 - 900) THEN PSET (xx% + xt%, yy% + yt%), (((((((20 - SQR(2500 - (((xt% - 50) * (xt% - 50)) + ((yt% - 50) * (yt% - 50)))))) * ((xt% - 50) / SQR(2500 - (((xt% - 50) * (xt% - 50)) + ( _
(yt% - 50) * (yt% - 50))))))) + xt% + xx%) AND 15) OR (((((20 - SQR(2500 - (((xt% - 50) * (xt% - 50)) + ((yt% - 50) * (yt% - 50)))))) * ((yt% - 50) / SQR(2500 - (((xt% - 50) * (xt% - 50)) + ((yt% - 50) * (yt% - 50)))))) + yt% + yy%) AND 15)) + 16  _
ELSE PSET (xx% + xt%, yy% + yt%), 0
8 NEXT xt%, yt%
9 IF INKEY$ = "" THEN 2



;*)


Title: Challenge....
Post by: BinarySHOCK on February 05, 2003, 02:18:19 AM
wow nice 1 rel, very cool!


Title: Challenge....
Post by: red_Marvin on February 05, 2003, 06:43:11 AM
I don't know much about peek/pokes memory adresses but here's
my screensaver:

Code:
1 RANDOMIZE TIMER
2 SCREEN 12
3 c = INT(RND * 14) + 1
4 IF POINT(0) < 0 OR POINT(0) > 640 OR POINT(1) < 0 OR POINT(1) > 480 THEN CLS
5 IF POINT(0) < 0 OR POINT(0) > 640 OR POINT(1) < 0 OR POINT(1) > 480 THEN PSET (320, 240), c
6 DRAW "ta" + STR$(INT(RND * 720) - 360) + "u" + STR$(INT(RND * 50) + 5)
7 CIRCLE (POINT(0), POINT(1)), RND * 10, c
8 FOR b = 0 TO 1000: NEXT
9 IF INKEY$ = "" THEN GOTO 3


Title: Challenge....
Post by: Agamemnus on February 05, 2003, 11:49:52 AM
heh, just what I wanted Rel. :)

What about a 3D pong game with that 9-line sphere? :) Might be a good idea...


Title: Challenge....
Post by: relsoft on February 06, 2003, 01:38:23 AM
Quote from: "Agamemnus"
heh, just what I wanted Rel. :)

What about a 3D pong game with that 9-line sphere? :) Might be a good idea...


In 9 lines?????!!!!!

Yer kidding me!!!!!

Code:


'Lightmapping by RelSoft 2003
'Http://RelSoft.ath.cx
'Sorry about this not being able to compile ;*(
'BC sez: "expression too complex" Guess Qb has its limits after all!!!

1 IF I& = 0 THEN SCREEN 13 ELSE IF I& < 256 THEN PALETTE I&, 65536 * (I& \ 4) + 256 * (I& \ 4) + (I& \ 4)
2 I& = (I& + 1) AND &H7FFFFFFF
3 Var$ = "" + CHR$(100 + COS((I& MOD 360) * 3.141593 / 180) * 100) + CHR$(60 + SIN((I& MOD 360) * 3.141593 / 180) * 60)
4 FOR yy% = 0 TO 99
5 FOR xx% = 0 TO 99
6 H2% = ((xx% - 50) * (xx% - 50) + (yy% - 50) * (yy% - 50))
7 IF (H2% < 2500) AND (I& > 255) THEN PSET (100 + (ASC(MID$(Var$, 1, 1)) - 100) + xx%, 60 + (ASC(MID$(Var$, 2, 1)) - 60) + yy%), (((255 - (SQR(H2%) * (SQR(SQR(H2%))))) + ((((ASC(MID$(Var$, 1, 1)) - 100) + xx%) OR ((ASC(MID$(Var$, 2, 1)) - 60) + yy%) _
) AND 127)) \ 2) * -((((255 - (SQR(H2%) * (SQR(SQR(H2%))))) + ((((ASC(MID$(Var$, 1, 1)) - 100) + xx%) OR ((ASC(MID$(Var$, 2, 1)) - 60) + yy%)) AND 127)) \ 2) > 0) ELSE IF (I& > 255) THEN PSET (100 + (ASC(MID$(Var$, 1, 1)) - 100) + xx%, 60 + (ASC( _
MID$(Var$, 2, 1)) - 60) + yy%), 0
8 NEXT xx%, yy%
9 IF INKEY$ = "" THEN 1




Title: Challenge....
Post by: BinarySHOCK on February 06, 2003, 02:09:53 AM
Finally some lightmapping!!!!
3d pong with a spheremapped ball in 9 lines?? your crazy! ;)


Title: Challenge....
Post by: toonski84 on February 06, 2003, 06:31:33 AM
good lord rel, you're making us all feel bad about our programming abilities :D

anyhow here's a cheesy little blur demo i made last night:

Code:
1 SCREEN 13
2 IF i& = 0 THEN SCREEN 13 ELSE OUT &H3C8, 0
3 IF i& = 0 THEN DEF SEG = &HA000 ELSE LINE (RND * 280 + 20, RND * 159 + 20)-(RND * 280 + 20, RND * 159 + 20), 255', B
4 FOR i& = 6400 TO 57600
5 IF i& < 7168 THEN OUT &H3C9, (i& - 6400) \ 12
6 POKE i&, (PEEK(i& - 1) + PEEK(i& + 1)) / 2
7 NEXT i&
8 LINE (RND * 280 + 20, RND * 159 + 20)-(RND * 280 + 20, RND * 159 + 20), 0', B
9 IF INKEY$ = "" THEN GOTO 3


Title: Challenge....
Post by: BinarySHOCK on February 06, 2003, 08:43:07 AM
i uploaded a better version of the 9 line pong, removed about 90% of the flicker, so ya go grab a new copy ;)


Title: Challenge....
Post by: relsoft on February 07, 2003, 03:07:13 AM
Whoooooooaaaaa!!!!!!!

WU LINES!!!!!!!



Don't worry, I'm averaging about 30 mins for the effect and about 3 hours fitting it in nine lines!!!!!

BTW the Lightmapping took me 4 hours last saturday. :*)

Great job guys!!!!!

Toonkski: is there any possibitity for your kewl text fire to be converted to :

Screen 0:width 80,50 ?

it would kick ass!!!!


Title: Challenge....
Post by: toonski84 on February 07, 2003, 06:41:38 PM
not if i can beat you to it :)

obviously ye has never tried to compress a wu line :D


Title: Challenge....
Post by: Antoni Gual on February 07, 2003, 07:25:26 PM
Here are some effects:

This one would be fine with some speed. Link it with ffix..
Code:

'sinus wave by Antoni Gual
1 SCREEN 13
2 FOR i% = 0 TO 100
3 FOR j% = 0 TO 100
4 PSET (i% + 120, j% + 50), ((i% / 8 + (COS(i% / 19.6) * tt * SIN(j% / 19.6))) AND 15) XOR ((j% / 8 + (SIN(i% / 19.6) * tt * COS(j% / 19.6))) AND 15) + 16
5 NEXT j%, i%
6 t = t + 1
7 tt = COS(t)
8 IF LEN(INKEY$) = 0 THEN GOTO 1



A cheap hack..
Code:

'mind-blowing square plasma by Antoni Gual
1 SCREEN 13
3 FOR Ix% = 0 TO 319
4      FOR Iy% = 0 TO 199
5      PSET (Ix%, Iy%), (Ix% - L%) AND (Iy% + L%) AND (Ix% + L%) AND (Iy% - L%)
6      NEXT Iy%, Ix%
7      L% = (L% + 1) AND 255
9 IF LEN(INKEY$) = 0 THEN 3



And pure maths one..

Code:

'Lissajous by Antoni Gual
1 IF k# = 0 THEN SCREEN 12 ELSE CLS
2 IF k# = 0 THEN RANDOMIZE TIMER ELSE n% = (RND * 14)
3 k# = INT(RND * 20 + 1) / INT(RND * 20 + 2)
4 k1# = 1 / k#
6 FOR j# = 0 TO 500 STEP .005
7 PSET (320 + 300 * SIN(k# * j#), 240 + 200 * SIN(j# * k1#)), n% + 1
8 NEXT
9 IF LEN(INKEY$) = 0 THEN GOTO 1
[/code]


Title: Challenge....
Post by: toonski84 on February 08, 2003, 01:17:42 AM
eh, i gave up on the wu line and went for the world's slowest 7-line anti-aliased circle drawer:

Code:
1 SCREEN 13
2 RANDOMIZE TIMER
3 c& = RND * 2048000
4 FOR x& = 0 TO 63999
5 IF ABS(SQR((x& MOD 320 - ((c& MOD 64000) MOD 320)) ^ 2 + (x& \ 320 - (c& MOD 64000) \ 320) ^ 2) - (c& \ 64000)) <= 1 THEN PSET (x& MOD 320, x& \ 320), (1 - ABS(SQR((x& MOD 320 - ((c& MOD 64000) MOD 320)) ^ 2 + (x& \ 320 - (c& MOD 64000) \ 320) ^ 2 _
) - (c& \ 64000))) * 14 + 16
6 NEXT x&
7 IF INKEY$ = "" THEN GOTO 1


Title: Challenge....
Post by: relsoft on February 08, 2003, 03:49:30 AM
kewl!!!!

Okay, for the names...

Antoni1.bas
Antoni16.bas

Joe1.bas
Joe6.bas


inside the file:

Dev:

Author: Antoni Gual
Site: Blah.cjb.net
Description: The most amazing floormapper I've seen!!!!

Hows that?

 :bounce:


Title: Challenge....
Post by: Antoni Gual on February 08, 2003, 08:29:09 AM
Rel:What's so amazing about my floormaper?
It's just a floormaper without any optimization.I only got rid of all artifices people uses to make it fast.
Your lightmapper or your lens are really serious effects..


Title: Challenge....
Post by: toonski84 on February 08, 2003, 01:44:34 PM
i think as the overall demo bin gets thinner, maybe we should make a way to judge all these demos.

my favs:
sphere and light mapper
floormapper
manderbolt (me no spell good)
starfield
glenn's super-duper demo!


Title: Challenge....
Post by: Antoni Gual on February 08, 2003, 02:14:14 PM
I would add to the list the non-standard pinwheel by wizardlife
And off course Glenn's nihilist demo is the winer!  :rotfl:


Title: Easy saver
Post by: qbasicmaster on February 08, 2003, 03:37:50 PM
I have made a screen saver but dont know how to stop it!!!!
This is the code
Code:
strt: CLS
SCREEN 13
LINE (1, 1)-(153, 360), 3, BF
LINE (153, 360)-(360, 153), 4, BF
GOTO strt

Only 4 lines but need to know how to stop it.
See ya!
QBmaster :lol:


Title: Challenge....
Post by: ak00ma on February 08, 2003, 04:47:51 PM
Here the code with a stop part:

Code:

strt: CLS
SCREEN 13
LINE (1, 1)-(153, 360), 3, BF
LINE (153, 360)-(360, 153), 4, BF
IF INKEY$ = "" THEN GOTO strt


So you only have to press a key to stop the proggy


Title: Challenge....
Post by: na_th_an on February 08, 2003, 04:50:47 PM
I wouldn't include that SCREEN 13 inside the loop... Think about this: some old VGA cards take time to switch mode, and also the CRT suffers when doing it... In that case, your proggy wouldn't be a screen saver but a screen killer :lol:


Title: Challenge....
Post by: toonski84 on February 09, 2003, 01:18:17 AM
Code:

1 IF x& = 0 THEN SCREEN 13 ELSE OUT &H3C8, 0
2 IF x& = 0 THEN DEF SEG = &HA000 ELSE i& = i& + iv&
3 IF x& = 0 THEN iv& = 1 ELSE IF i& = 320 OR i& = -1 THEN iv& = -iv&
4 CIRCLE (i&, -ABS(COS(i& / 30) * 80) + 153), 4, 30
5 PAINT (i&, -ABS(COS(i& / 30) * 80) + 153), 30
6 FOR x& = 12800 TO 51200
7  IF ABS(i& - (x& MOD 320)) < 18 THEN IF PEEK(x&) = 0 THEN POKE x&, 16 ELSE POKE x&, ((PEEK(x& + 1) + PEEK(x& - 1) + PEEK(x& + 320) + PEEK(x& - 320)) - 64) \ 4 + 16
8 NEXT x&
9 IF INKEY$ = "" THEN GOTO 1



interviewer: joe, are you running out of ideas?
joe: yes, yes i am.


Title: Challenge....
Post by: relsoft on February 09, 2003, 04:21:18 AM
Quote from: "toonski84"
i think as the overall demo bin gets thinner, maybe we should make a way to judge all these demos.

my favs:
sphere and light mapper
floormapper
manderbolt (me no spell good)
starfield
glenn's super-duper demo!


Glenn wins!!!!

Hands the wise-one a cheese.....

cheers,

L......y


Title: Challenge....
Post by: red_Marvin on February 09, 2003, 09:15:54 AM
oups! I just realized my entry uses a colon joined for(next
delay function, but whatever, you could always delete the
delay hehe


Title: Challenge....
Post by: Antoni Gual on February 09, 2003, 01:18:16 PM
My favourites:
Rel's Translucent plasma,Lens and Lightmap
Toonski's spirograph
Dav's textured random painting
Binary Shock Xor square plasmas
Wizardlife non-standard pinwheel
Lithium smiley zoomer
Nathan "fire" plasma


Title: Challenge....
Post by: na_th_an on February 09, 2003, 01:27:28 PM
Haven't you seen my fire? :D


Title: Challenge....
Post by: Antoni Gual on February 09, 2003, 01:36:00 PM
Nathan:
No doubt converting the C fire you posted  into a 9 lines basic program has been a hard job... but it does'nt look like a fire, at least in my computer. I added it to my favourites list ..as a plasma. :D


Title: Challenge....
Post by: toonski84 on February 09, 2003, 04:19:22 PM
!!  i cant believe i never tried rel's second plasma until now!! oh my god, that is AWESOME, *you win*.  another one i failed to test was lithium's starfield with lighting and motion blur... that is amazing!


Title: Challenge....
Post by: toonski84 on February 09, 2003, 04:26:43 PM
oh, and i dont know who wanted this, i think it was rel, but i converted my text fire to "hi res" 80x50 and added a vertical refresh:

Code:
1 IF i = 0 THEN WIDTH 80, 50 ELSE OUT &H3C8, 0
2 FOR i = 0 TO 18
3 IF i = 18 THEN WAIT &H3DA, 8 ELSE IF i MOD 3 = 0 THEN OUT &H3C9, (i \ 3) * 10 ELSE OUT &H3C9, 0
4 NEXT i
5 IF x% = 0 THEN DEF SEG = &HB800 ELSE CLS
6 FOR x% = 7999 TO 5080 STEP -2
7 IF x% > 7840 THEN POKE x%, CINT(RND) * 80 ELSE POKE x%, ((PEEK(x% + 160) + PEEK(x% + 162) + PEEK(x% + 158) + PEEK(x% + 320) * 1.5) / 5)
8 NEXT
9 IF INKEY$ = "" THEN GOTO 1


Title: Challenge....
Post by: Antoni Gual on February 09, 2003, 08:56:51 PM
Nathan:
I just compiled your C fire, and this one is a real  fire! :D
I don't know what do you and Phobeus did to the poor QB fire to squeeze it into 9 lines... :???:


Title: Menos mal!
Post by: phobeous on February 09, 2003, 09:06:56 PM
Now i was going to tell you that the 9 lines QB fire comes from one of the most realistic fire coded in C  :D In QB the fire don't seems to be such a fire due to palette, i mean, the palette we use in QB has more white than the C one.

I hope you liked it. BTW we made an ASM library with simillar efects. We coded that for a intro but (as always) we didn't finish it.


Title: Challenge....
Post by: westie on February 10, 2003, 02:33:44 AM
SCREEN 13
DO
a = RND * 320
b = RND * 200
CIRCLE (a, b), RND * 100, RND * 14
PAINT (a, b), 0
LOOP WHILE INKEY$ = ""


do i gain points because it is short?


Title: Challenge....
Post by: Rokkuman on February 10, 2003, 03:04:45 AM
Code:

SCREEN 13
FOR I% = 1 TO 256
        OUT &H3C8, I%: OUT &H3C9, 0: OUT &H3C9, 0: OUT &H3C9, I% * 5
NEXT
DO
        A = INT(RND * 320) + 2
        B = INT(RND * 200) + 2
        LINE (A + SIN(A * 9), B + COS(B \ 9))-(A + COS(A \ 9), B + SIN B * 9)) , A * B \ B
LOOP

Here's my first entry, I just typed in a bunch of random variables and whatnot, and this is what it looked like.


Title: Challenge....
Post by: relsoft on February 10, 2003, 03:20:13 AM
Toonski: Woot!!!!! Wooot!!!!!

See it looks great in 80*50!!!!

some 3dwaves:

this is the 9 line Flickers code:

Code:

'The Waves..... By RelSoft 2003
'Relsoft.ath.cx

1  IF A% = 0 THEN SCREEN 12 ELSE DIM TX!(15, 15), TY!(15, 15)
2  A% = (A% + 10) MOD 360
3  LINE (0, 0)-(639, 479), 0, BF
4  FOR x% = 0 TO 14
5  FOR z% = 0 TO 15
6  PSET ((320 + ((x% * (1 / 15 * 640)) - 320) / ((z% * (1 / 15 * 640)) / 640 + 1)), (320 + ((150 + 25 * SIN((A% + (15 * (((x% - (N / 2)))) ^ 2 + ((z% - (N / 2))) ^ 2)) * (3.141593 / 180))) - 320) / ((z% * (1 / 15 * 640)) / 640 + 1))), 16 - (((z% * ( _
1 / 15 * 640)) / 640 + 1) - 1) * 15
7  NEXT z%, x%
8  WAIT &H3DA, 8
9  IF INKEY$ = "" THEN 2



This one is better looking but 10 lines so its disqualified:

Code:


'The Waves..... By RelSoft 2003
'Relsoft.ath.cx

1  IF A% = 0 THEN SCREEN 12 ELSE DIM TX!(15, 15), TY!(15, 15)
2  A% = (A% + 10) MOD 360
3  FOR x% = 0 TO 14
4  FOR z% = 0 TO 15
5  PSET (TX!(x%, z%), TY!(x%, z%)), 0
6  TX!(x%, z%) = 320 + ((x% * (1 / 15 * 640)) - 320) / ((z% * (1 / 15 * 640)) / 640 + 1)
7  TY!(x%, z%) = 320 + ((150 + 25 * SIN((A% + (15 * (((x% - (N / 2)))) ^ 2 + ((z% - (N / 2))) ^ 2)) * (3.141593 / 180))) - 320) / ((z% * (1 / 15 * 640)) / 640 + 1)
8  PSET (TX!(x%, z%), TY!(x%, z%)), 16 - (((z% * (1 / 15 * 640)) / 640 + 1) - 1) * 15
9  NEXT z%, x%
10 IF INKEY$ = "" THEN 2




Title: Challenge....
Post by: Agamemnus on February 10, 2003, 01:33:23 PM
That is REALLY REALLY impressive!!

Weird yet IMPRESSIVE!

Nice @ Megaman, but you forgot a
Code:

(


Title: Challenge....
Post by: relsoft on February 10, 2003, 11:56:52 PM
Gotta luv that Cyrix...

Code:


'"Blurred StarField"
'relsoft.ath.cx

1 IF I& = 0 THEN SCREEN 13 ELSE IF I& < 256 THEN PALETTE I&, 65536 * (I& \ 4) + 256 * (I& \ 4) + (I& \ 4)
2 I& = (I& + 1) AND &H7FFFFFFF
3    FOR K& = 0 TO 255 STEP 1
4        IF I& > 256 THEN CIRCLE (160 + COS(K& - I&) * K&, 100 + SIN(K& - I&) * K&), 1, 255
5    NEXT K&
6 IF I& > 255 THEN J& = (J& + 1) ELSE GOTO 9
7    IF I& > 256 THEN POKE J&, (PEEK(J&) + PEEK(J& - 1) + PEEK(J& + 1) + PEEK(J& - 320) + PEEK(J& + 320)) \ 5 ELSE IF I& = 256 THEN DEF SEG = &HA000
8 IF J& < 64000 THEN 5 ELSE J& = -1
9 IF INKEY$ = "" THEN 1

DEF SEG





Title: Challenge....
Post by: toonski84 on February 11, 2003, 12:00:20 AM
no, really, rel, you can stop it!!

i dont know if "starfield" is really the best word for that though *shrug*.  i have an idea on how to combine a real starfield and a blur but it's slow.


Title: Challenge....
Post by: relsoft on February 11, 2003, 12:06:44 AM
Please post.... Nice to learn new stuff.

Would that be:

X=I&\320
Y=(I& mod 320)\320

?
:*)

OMG!!! that bouncing blurr is Kewl!!! Fast too!!!!


Title: Challenge....
Post by: toonski84 on February 11, 2003, 12:13:11 AM
erm, to convert linear mode 13 coordinates to regular:

x = i& mod 320
y = i& \ 320

and i said i had an idea, which means i'll be tackling this tomorrow :)


Title: Challenge....
Post by: relsoft on February 11, 2003, 12:21:17 AM
Kewl!!!!!

But i am using this:

I&=(I&+1) amd &H7fffffff

So I need the exta mod. :*)

Would somebody count how many F's are there?

;*)


Title: Challenge....
Post by: toonski84 on February 11, 2003, 12:34:43 AM
cool :D  7 f's.  but what does it do?  ensure you dont reach infinity?


Title: Challenge....
Post by: relsoft on February 11, 2003, 04:26:55 AM
oooops!! Major Gufaw....

Should be MOD 64000 not mod 320

Nahh that's the AND doing what's its supposed to do . *)


Title: A compil
Post by: biskbart on February 13, 2003, 04:09:14 AM
I decided to compil nearly all the programs in a ZIP file because it was not very useful. You can find it on
biskbart.free.fr (http://biskbart.free.fr)


Title: Challenge....
Post by: Antoni Gual on February 13, 2003, 06:07:53 PM
To have the right to do it you must post a demo! :wink:


Title: Challenge....
Post by: relsoft on February 14, 2003, 02:21:52 AM
Yay!!! Biskbart's alive!!!!!

:*)

Post dude!!!

 :rotfl:


Title: Challenge....
Post by: Neo on February 14, 2003, 08:33:30 AM
HEY  8) finally I see him somewhere LoL

mmmmrh hrmmmm, *looks on HD*, I still have his cool Demo for the QB Demo Contest 2001. However, the Piano tune gets more irritating...


Title: Challenge....
Post by: BlueKeyboard on February 14, 2003, 09:38:14 AM
Here is my "impossible circle" :D.
Code:

1 SCREEN 13
2 M$ =  "19171819202122232425262728293031191718192021222324252627282930311917181920212223242526272829303119171819202122232425262728293031191718192021222324252627282930311917181920212223242526272829303119171819202122232425262728293031191718192021222324252627282930311917181920212223242526272829303119171819202122232425262728293031191718192021222324252627282930311917181920212223242526272829303119171819202122232425262728293031191718192021222324252627282930311917181920212223242526272829303119171819202122232425262728293031"
3 DO
4 FOR A! = 0 TO 25 STEP .01
5 FOR Y% = 0 TO 15
6 FOR X% = 0 TO 15
7 PSET (160 + COS(A!) * 50 + X%, 100 + SIN(A!) * 50 + Y%), VAL(MID$(M$, ((Y% * 2) * 16) + (X% * 2) + 1, 2))
8 NEXT X%, Y%, A!
9 LOOP


Title: That's ok
Post by: biskbart on February 14, 2003, 09:40:30 AM
An ugly fire effect. Sorry

Code:

1 SCREEN 13
2 DEF SEG = &HA000
3 FOR I& = 50000 TO 63999 + 640
4 IF I& < 50768 THEN OUT &H3C9, (I& - 50000) \ 12
5 IF I& > 63950 THEN POKE 63999 + RND * 640, 250
6 POKE I&, (PEEK(I&) + PEEK(I& + 319) + PEEK(I& + 320) + PEEK(I& + 321)) * .235
7 NEXT I&
8 IF INKEY$ = "" THEN 30


Title: Challenge....
Post by: Agamemnus on February 14, 2003, 10:51:27 PM
Key,
It's obviously not a circle.


It's 2 interlocked rings.

BTW,

Where's the exit condition?

bikbart,
Line 3.


Title: Challenge....
Post by: someone42 on February 15, 2003, 05:05:54 AM
Hey all those graphic demos are real good, especially since they only take up 9 lines!

Anyways here's mine:


Code:
' Explosion screensaver by someone42
1 SCREEN 13
2 DIM p(255) AS LONG, A AS STRING * 4104
3 IF x& = 0 THEN CLS  ELSE IF x& MOD 256 = 0 THEN PALETTE USING p(0)
4 IF x& < 128 AND x& > 0 THEN p(x&) = ((64 - x& * 2 + 1) AND NOT (((64 - x& * 2 + 1) AND &HFF00) \ 256)) * 65536 + ((95 - x&) AND &H3F AND NOT (((95 - x&) AND &HFF00) \ 256) OR (((x& - 32) AND &H3F00) \ 256)) * 256 + ((256 - 2 * x& - 1) AND &H3F OR  _
(((x& - 96) AND &H3F00) \ 256)) ELSE IF x& > 639 AND ((x& - 384) \ 256) > ((x& - 384) AND 255) THEN p((x& - 384) AND 255) = ((NOT SGN(p((x& - 384) AND 255) - &H40000)) AND (p((x& - 384) AND 255) - &H40000) AND &H3F0000) + ((NOT SGN((p((x& - 384) AND _
 255) AND &HFF00) - 1024)) AND (p((x& - 384) AND 255) - 1024) AND &H3F00) + ((NOT SGN((p((x& - 384) AND 255) AND 255) - 4)) AND (p((x& - 384) AND 255) - 4) AND 63)
5 IF x& < 384 AND x& > 127 THEN MID$(A, (x& - 128) * 16 + 1, 24) = MKS$(RND * 6.28318 - 3.14159) + MKS$(RND / 2) + MKI$(CVS(MID$(A, 1, 4)) * 3259.496) + MKI$(CVS(MID$(A, 5, 4)) * 12800 - 6400) + MKI$(SIN(CVS(MID$(A, (x& - 128) * 16 + 1, 4))) * CVS( _
MID$(A, (x& - 128) * 16 + 5, 4)) * 512) + MKI$(COS(CVS(MID$(A, (x& - 128) * 16 + 1, 4))) * CVS(MID$(A, (x& - 128) * 16 + 5, 4)) * 384) + MKS$(RND * 6.28318 - 3.14159) + MKS$(RND / 2)
6 IF x& > 383 THEN MID$(A, ((x& - 384) AND 255) * 16 + 9, 8) = MKI$(CVI(MID$(A, ((x& - 384) AND 255) * 16 + 9, 2)) + CVI(MID$(A, ((x& - 384) AND 255) * 16 + 13, 2))) + MKI$(CVI(MID$(A, ((x& - 384) AND 255) * 16 + 11, 2)) + CVI(MID$(A, ((x& - 384)  _
MOD 256) * 16 + 15, 2))) + MKI$(CVI(MID$(A, ((x& - 384) MOD 256) * 16 + 13, 2)) * .98) + MKI$(CVI(MID$(A, ((x& - 384) MOD 256) * 16 + 15, 2)) * .98)
7 IF x& > 383 AND (x& - 384) MOD 256 <> 0 THEN CIRCLE ((CVI(MID$(A, ((x& - 384) AND 255) * 16 + 9, 2)) + 10240) / 64, (CVI(MID$(A, ((x& - 384) AND 255) * 16 + 11, 2)) + 12800) / 64), 1, (x& - 384) \ 256
8 x& = (x& + 1) MOD 32897
9 IF INKEY$ = "" THEN 3


Hehe sorry about the length - my original program was 52 lines and it took a lot of trouble to get it down to 9. Yeah and I know the IF...THEN...ELSE...IF...THEN thing is a really cheesy hack to fit more into one line, but there was no other way to do it. It may run a bit slow (it's about 6 times slower than the original, uncompressed program!)


Title: Challenge....
Post by: toonski84 on February 15, 2003, 12:59:11 PM
hey, that's an awesome demo, someone42!  got any other programs that arent 9 lines?


Title: Challenge....
Post by: Lanzaa on February 15, 2003, 01:31:03 PM
hey i just wanted to point something out to bluekeyboard
use the "If inkey$ = "" goto 4" or what ever instead of do...loop

Code:
1 SCREEN 13
2 M$ =  "19171819202122232425262728293031191718192021222324252627282930311917181920212223242526272829303119171819202122232425262728293031191718192021222324252627282930311917181920212223242526272829303119171819202122232425262728293031191718192021222324252627282930311917181920212223242526272829303119171819202122232425262728293031191718192021222324252627282930311917181920212223242526272829303119171819202122232425262728293031191718192021222324252627282930311917181920212223242526272829303119171819202122232425262728293031"  
4 FOR A! = 0 TO 25 STEP .01
5 FOR Y% = 0 TO 15
6 FOR X% = 0 TO 15
7 PSET (160 + COS(A!) * 50 + X%, 100 + SIN(A!) * 50 + Y%), VAL(MID$(M$, ((Y% * 2) * 16) + (X% * 2) + 1, 2))
8 NEXT X%, Y%, A!
9 If inkey$ = "" goto 4


cuts down a line of code which you can use and makes it so you can exit 8)


Title: Challenge....
Post by: someone42 on February 16, 2003, 01:59:34 AM
Quote
got any other programs that arent 9 lines?


Well, if you're talking about graphic demos, not really. But usually I just program bits and pieces of graphical/sound/network junk.
Of course that means I have over 200 files sitting in \QB45 :)

Well, here's another one based around the same concepts:
Code:
' Crackler screensaver by someone42
1 SCREEN 9
2 a$ = MKI$(320) + MKI$(175) + MKI$(1) + MKI$(1) + STRING$(12288, 0)
3 IF x& MOD 128 = 0 THEN MID$(a$, 1, 8) = MKI$(CVI(MID$(a$, 1, 2)) + CVI(MID$(a$, 5, 2))) + MKI$(CVI(MID$(a$, 3, 2)) + CVI(MID$(a$, 7, 2))) + MID$(a$, 5, 4)
4 IF x& MOD 128 = 0 THEN MID$(a$, 5, 4) = MKI$((2 * ((0 > CVI(MID$(a$, 1, 2))) OR (640 < CVI(MID$(a$, 1, 2)))) + 1) * CVI(MID$(a$, 5, 2))) + MKI$((2 * (0 > CVI(MID$(a$, 3, 2)) OR 350 < CVI(MID$(a$, 3, 2))) + 1) * CVI(MID$(a$, 7, 2)))
5 IF MID$(a$, x& * 12 + 19, 2) = STRING$(2, 0) THEN MID$(a$, x& * 12 + 9, 12) = MKI$((CVI(MID$(a$, 1, 2)) - 320) * 64) + MKI$((CVI(MID$(a$, 3, 2)) - 175) * 64) + MKI$(RND * 512 - 256) + MKI$(RND * 512 - 256) + MKI$(RND * 15 + 1) + MKI$(RND * 24 + 4) _
 ELSE MID$(a$, x& * 12 + 9, 12) = MKI$(CVI(MID$(a$, x& * 12 + 9, 2)) + CVI(MID$(a$, x& * 12 + 13, 2))) + MKI$(CVI(MID$(a$, x& * 12 + 11, 2)) + CVI(MID$(a$, x& * 12 + 15, 2))) + MID$(a$, x& * 12 + 13, 6) + MKI$(CVI(MID$(a$, x& * 12 + 19, 2)) - 1)
6 IF MID$(a$, x& * 12 + 19, 2) <> STRING$(2, 0) THEN PSET (CVI(MID$(a$, x& * 12 + 9, 2)) \ 64 + 320, CVI(MID$(a$, x& * 12 + 11, 2)) \ 64 + 175), CVI(MID$(a$, x& * 12 + 17, 2))
7 PSET ((CVI(MID$(a$, x& * 12 + 9, 2)) - CVI(MID$(a$, x& * 12 + 13, 2))) \ 64 + 320, (CVI(MID$(a$, x& * 12 + 11, 2)) - CVI(MID$(a$, x& * 12 + 15, 2))) \ 64 + 175), 0
8 x& = (x& + 1) MOD 1024
9 IF INKEY$ = "" THEN 3


Title: Challenge....
Post by: BlueKeyboard on February 16, 2003, 12:46:22 PM
Quote from: "Agamemnus"

Key,
It's obviously not a circle.


It's 2 interlocked rings.


That is a circle....
Oh and just CTRL+Break.

Quote from: "lanzaa"

hey i just wanted to point something out to bluekeyboard
use the "If inkey$ = "" goto 4" or what ever instead of do...loop

I know, it was 8 lines first, but I made it to 9 lines :D(but I don't know ....why:)).


Title: Challenge....
Post by: toonski84 on February 16, 2003, 01:40:00 PM
hahaha!! seriously, someone, that's awesome!!

how long have you been coding?


Title: Wirlpool
Post by: Antoni Gual on February 16, 2003, 09:00:37 PM
Code:

'Antoni Gual, from an idea  by Steve Nunnaly

1 IF i THEN CIRCLE (160, 100), i, (i MOD 16) + 32, , , .8 ELSE SCREEN 13
2 i = i + 1
3 IF i < 200 THEN GOTO 1 ELSE DIM b2%(5000)
4 w = (w + .3)
5 xmid = 140 + SIN(7 * w / 1000) * 110
6 ymid = 80 + SIN(11 * w / 1000) * 59
7 GET ((xmid - (SIN(w) * 28)), (ymid - (COS(w) * 20)))-((xmid - (SIN(w) * 28)) + 40, (ymid - (COS(w) * 20)) + 40), b2%
8 PUT ((xmid - (SIN(w - .04) * 27.16)), (ymid - (COS(w - .04) * 19.4))), b2%, PSET
9 IF LEN(INKEY$) = 0 THEN GOTO 4


Title: Challenge....
Post by: relsoft on February 17, 2003, 02:02:31 AM
Kewl Additions guys!!!

I knew of "Someone"  who likes to 42 people.....

hmmmmm.......

 :)


Title: Challenge....
Post by: someone42 on February 17, 2003, 04:54:42 AM
Quote
how long have you been coding?


Only a couple of years. I'm not a newbie to qb but I am a newbie to this forum.

Quote
I knew of "Someone" who likes to 42 people.....

And who has that? :D

Well, 42 was a random number chosen because "someone" was taken.


Title: Challenge....
Post by: toonski84 on February 17, 2003, 05:32:10 AM
ever read "hitchiker's guide to the galaxy?", someone?  42 is the answer to everything ;)  

and @antoni: HOLY**** THAT IS AN AWESOME DEMO.


Title: Challenge....
Post by: Neo on February 17, 2003, 06:38:30 AM
:o  :o  :o  :o  :o
WOW! There's good stuff here!

 :oops:  :oops:
Oops, didn't make a 9-line effect myself yet :-/ oops LoL


Title: Challenge....
Post by: relsoft on February 18, 2003, 01:38:36 AM
Antoni: Whoaaa!!!!(again)

:*)


Title: Challenge....
Post by: BlueKeyboard on February 18, 2003, 04:02:57 PM
Code:

1 SCREEN 13
'2 FOR I% = 0 TO 63 * 3 STEP 3
'3 FOR E% = 0 TO 3
'4 OUT &H3C6, &HFF
'5 OUT &H3C8, I% + E% + 1
'6 OUT &H3C9, 0
'7 OUT &H3C9, I% / 3
'8 OUT &H3C9, 0
'9 NEXT E%, I%
10 LINE (0, 0)-(319, 199), 0, BF
11 FOR I = 1 TO 359 STEP .09
12 PSET (160 + COS(I + N%) * I, 100 + SIN(I + N%) * I), 2
13 NEXT
14 N% = N% + 1
15 GOTO 10
               
Dont stare at it too long  :P.
I couldn't fit the palette mod inside :(, but if you run with it, change  
Code:

12 PSET (160 + COS(I + N%) * I, 100 + SIN(I + N%) * I), 2
to
12 PSET (160 + COS(I + N%) * I, 100 + SIN(I + N%) * I), I


Title: Challenge....
Post by: toonski84 on February 18, 2003, 07:40:44 PM
palette mod dont work but if it did you could easily fit in there.  (two hints: you can use comparison operators in math expressions, and your for next group, and you can adjust the for next look to cover 768 values easy. *shuts up now*


Title: Challenge....
Post by: BlueKeyboard on February 19, 2003, 05:37:42 PM
It doesn't work?  :???:.
Are you sure you changed
12 PSET (160 + COS(I + N%) * I, 100 + SIN(I + N%) * I), 2
to
12 PSET (160 + COS(I + N%) * I, 100 + SIN(I + N%) * I), I

Quote from: "toonski84"
(two hints: you can use comparison operators in math expressions, and your for next group, and you can adjust the for next look to cover 768 values easy. *shuts up now*

Hmmmm, how? :D.


Title: Challenge....
Post by: toonski84 on February 19, 2003, 08:14:42 PM
Code:
1 IF i = 0 THEN SCREEN 13 ELSE OUT &H3C8, 0
2 LINE (0, 0)-(319, 199), 0, BF
3 FOR i = 1 TO 3590
4 IF i < 769 THEN OUT &H3C9, (((i - 1) MOD 3) AND 1) * ((i - 1) \ 3) \ 4
5 PSET (160 + COS((i / 10) + N%) * .1 * i, 100 + SIN(i / 10 + N%) * i / 10), i \ 10
6 NEXT
7 N% = N% + 1
8 WAIT &H3DA, 8
9 GOTO 2


turns out you didnt need any of that crap :D

but, since i talked about it, run this:
x = 1
y = -(x < 2)
print y
y = -(x > 2)
print y


Title: Text mode rotozoomer
Post by: BinarySHOCK on February 22, 2003, 01:41:05 AM
oh ya...

1 Ang! = Ang! + .05
2 Var$ = MKI$(COS(Ang!) * SIN(Ang!) * 128) + MKI$(SIN(Ang!) * SIN(Ang!) * 128)
3 FOR Ix% = -40 TO 39
4      FOR Iy% = -13 TO 11
5           LOCATE Iy% + 14, Ix% + 41
6           COLOR (((((Ix% * CVI(MID$(Var$, 1, 2)) + Iy% * CVI(MID$(Var$, 3, 2))) XOR (Iy% * CVI(MID$(Var$, 1, 2)) - Ix% * CVI(MID$(Var$, 3, 2)))) \ 512)) AND 15)
7           PRINT CHR$(176);
8      NEXT Iy%, Ix%
9 IF LEN(INKEY$) = 0 THEN 1


Title: Challenge....
Post by: R@dioman on February 22, 2003, 01:44:38 AM
Niiiiice!! 8)


Title: Challenge....
Post by: red_Marvin on February 23, 2003, 01:51:15 PM
What about this?

Code:
' Nineliner by red_Marvin:
' green boxes!
' runs smooth on a P90
' color number = 65536 * blue + 256 * green + red
'---ENJOY!---
'
1 RANDOMIZE TIMER
2 SCREEN 13
3 PALETTE n, n * 256
4 PALETTE 63 - n, n * 256
5 IF n = 32 THEN x = INT(RND * 32) * 10 ELSE n = n + 1
6 IF n < 32 THEN GOTO 3 ELSE y = INT(RND * 20) * 10
7 c = POINT(x, y)
8 IF c <= 0 THEN LINE (x, y)-(x + 9, y + 9), 63, B ELSE LINE (x, y)-(x + 9, y + 9), c - 1, B
9 IF INKEY$ = "" THEN GOTO 5


edit: Changed the code a little


Title: Challenge....
Post by: toonski84 on February 23, 2003, 02:53:09 PM
hey, that's pretty dank, red marvin!  "green boxes" is an understatement!


Title: Challenge....
Post by: red_Marvin on February 23, 2003, 03:11:09 PM
what does dank mean?

anyway do anybody know why I can't PALETTE the colors above
63 in screen 13?


Title: Challenge....
Post by: na_th_an on February 23, 2003, 03:15:12 PM
You can palette the colours above 63. But beware, r, g or b must be 0-63. Maybe that was the fault.

Code:
PALETTE 127,4+256*20+65536*45


Is correct, for example.


Title: Challenge....
Post by: red_Marvin on February 23, 2003, 03:21:53 PM
maybe that was the fault...


Title: Challenge....
Post by: oracle on April 17, 2003, 11:11:37 PM
I know this thread seems to have finished a while ago, but these programs are all so cool, so I have to ask: where can I get them all in an easy zipped package?

Or:

Can I take these and host them on QBasic New Zealand? I'll add a link for anyone who says yes to their site of choice, or an email address or whatever you guys want.


Title: Challenge....
Post by: na_th_an on April 17, 2003, 11:40:53 PM
Ask to rel. He was keeping some kind of archive.

I'm quite sure you can host those programs in your site. At least, you can host phobeous and mine's (that cool fire effect).


Title: Challenge....
Post by: oracle on April 18, 2003, 12:00:07 AM
Definately the fire effect. And the forest.bas too. Why didn't antoni put those 300 data lines into one huge data line?


Title: Challenge....
Post by: TerraGoetia on April 18, 2003, 12:22:04 AM
This is a seven-liner I did at school.  You've probably seen something like this 100's of times.

Quote

1 SCREEN 13
2 DO
3 IF INKEY$ <> "" THEN END
4 X = INT(RND * 250) + 1
5 Y = INT(RND * 250) + 1
6 CIRCLE STEP (0,0), X, Y
7 LOOP


Title: Challenge....
Post by: na_th_an on April 18, 2003, 12:30:10 AM
Quote from: "oracle"
Definately the fire effect. And the forest.bas too. Why didn't antoni put those 300 data lines into one huge data line?


Well, because of line length restrictions. "Expression too complex" can be given if lines are greater than 256 characters long. From that line size, BC.EXE begins behaving oddly :P

Anyway, those 300 data lines don't count 'cause the effect itself is done in the first lines. The DATAs are just for the neato image.


Title: Challenge....
Post by: oracle on April 18, 2003, 12:54:58 AM
I have linux back!!!

So... I have debian and got dosemu through apt-get (the coolest program in linux btw!)... now, how do I get it to stop giving me the "sorry, there is no operating system. Goodbye!" message, and get it to start running qbasic?

TerraGoteia: Thanks, source is always good. I don't event understand half the hardware stuff these guys are (were?) pulling, so I'm making it my job to soon (after my site is up).


Title: Challenge....
Post by: na_th_an on April 18, 2003, 06:56:00 AM
Well, you have to install MSDOS, DRDOS or FreeDOS in DosEMU. I would recommend you MSDOS if you have it, if not, just download FreeDOS. Anyhow, a single "MSDOS diskette images" should be OK in Google ;).


Title: Challenge....
Post by: red_Marvin on April 18, 2003, 05:47:02 PM
I haven't written any licence agreement for my nineliner,
so you're free to do what you want with it
(as long as you don't pretend somebody else than me has done it)


Title: Challenge....
Post by: oracle on April 19, 2003, 01:25:02 AM
All source code I recieve will be credited to its correct owner. However I may improve any code I recieve to make a better/faster program out of it, but the origional creator will still be credited with the base work.

I'm gonna see if I can get DOS now.


Title: Challenge....
Post by: na_th_an on April 19, 2003, 09:34:54 AM
Here: http://aw.localhost.ee/aw/view/1145.html

You have to create a membership, but it is free.


Title: Challenge....
Post by: red_Marvin on April 19, 2003, 02:18:27 PM
oracle: I never meant I don't trust you and I trust everybody here
if they say "I've done this code myself" but what I said was just
this normal security/rights/watever blah and I didn't mean to
offend you or anybody else here as a matter of fact, I take it
as a great honour if somebody is willing to do anything with my
code as I think my programming skills are very modest in comparision
with other programmers here...

 :)


Title: Challenge....
Post by: oracle on April 20, 2003, 01:37:00 AM
Marvin: That's cool. I just wanted my policy known to all  :wink:


Title: Challenge....
Post by: relsoft on April 21, 2003, 02:00:54 AM
Oracle: Yep you can host em. :*)

Link:

http://qb45.tonez-online.com/qbasic/pn/modules.php?op=modload&name=Downloads&file=index&req=viewdownloaddetails&lid=1475&ttitle=The_Nine_Liners


Title: Challenge....
Post by: oracle on April 21, 2003, 06:20:37 PM
Thanks!

I never found that site before, can you believe it? It never showed up when I was doing a google search. I should be searching with dogpile or something...

Nathan: DOSEMU WORKS!!! Thanks man! Now to get the mouse to work and then I'm really rocking!


Title: Challenge....
Post by: seph on May 22, 2003, 09:53:50 PM
I like this one a lot, considering I'm not a very creative person :D

Code:
SCREEN 13
WHILE INKEY$ = ""
        'CLS
        RANDOMIZE TIMER * 4
        x = INT((320) * RND + 1)
        y = INT((200) * RND + 1)
        PSET (x, y), x + y
        IF x = y THEN CLS
WEND


Title: Challenge....
Post by: seph on May 22, 2003, 10:18:51 PM
Jesus, there are over 20 screensavers on the first 2 pages alone! How do I know which ones are worth seeing!?


Title: Challenge....
Post by: relsoft on May 23, 2003, 12:28:36 AM
All of it are worth seeing. Check out all of it or you'll miss some of the best. :*)


Title: Challenge....
Post by: oracle on May 23, 2003, 02:36:02 AM
An' they're all going up on QBNZ, so congrats to the authors for making some of the best limited line code I have seen, and please, by all accounts, make some more!


Title: Challenge....
Post by: BinarySHOCK on May 23, 2003, 03:34:03 AM
well here's another 1

1  SCREEN 13
2  M% = 1
3  FOR J% = 0 TO 119
4       FOR I% = 0 TO 119
5            PSET (I% + 95, J% + 30), SQR((I% * J%) MOD (L% + 1))
6       NEXT I%, J%
7  L% = (L% + M%)
8  IF L% = 64 OR L% = 0 THEN IF M% = 1 THEN M% = -1 ELSE M% = 1
9  IF LEN(INKEY$) = 0 THEN 3


Title: Challenge....
Post by: oracle on May 23, 2003, 08:07:24 PM
Good... keep sending them in, they'll all be goin' on QBNZ.


Title: Challenge....
Post by: seph on May 24, 2003, 02:06:24 PM
A little editted to look a little cool...

Code:
'6-line SS by Seph

1 SCREEN 13
2 RANDOMIZE TIMER
3 x = RND(320) * 320 + 1
4 y = RND(200) * 200 + 1
5 PSET (x, y), (x MOD (RND(2) + 1)) + (y MOD (RND(2) + 1)) AND 2
6 IF INKEY$ = "" THEN GOTO 3


[edit] made smaller by 1 line


Title: here's one...7 lines, 187 bytes
Post by: Mango on May 24, 2003, 05:03:25 PM
Code:
1 SCREEN 13
2 FOR t = 1 TO 320
3 x = RND * 320
4 PSET (x, (x AND (RND * t)) / 1.6), x AND t
5 PSET (320 - x, 200 - (x AND (RND * t)) / 1.6), x AND t
6 NEXT t
7 IF INKEY$ = "" GOTO 2


Title: Screen Saver
Post by: Dantheman10110 on May 24, 2003, 08:58:16 PM
Mines just retarded, but who cares.

Code:
SCREEN 13

Code:
DO

Code:
FOR c = 1 TO 256

Code:
RANDOMIZE TIMER

Code:
PSET((rnd*319)+1,(rnd*199)+1),c

Code:
NEXT

Code:
LOOP UNTIL INKEY$ <> ""


Title: Challenge....
Post by: red_Marvin on May 25, 2003, 11:23:24 AM
Code:
' Nineliner by red_Marvin:
' DNAMATRIX
' runs OK on a P90
' color number = 65536 * blue + 256 * green + red
'---ENJOY!---
'
1 RANDOMIZE TIMER
2 SCREEN 13
3 FOR n = 0 TO 63
4 PALETTE n, n * 256
5 NEXT
6 x = INT(RND * 32) * 10
7 y = INT(RND * 199) + 1
8 LINE (x, y)-(x + 5, y), (POINT(x, y - 2) + RND AND 63) * RND * 2 AND 63
9 IF INKEY$ = "" THEN GOTO 6


IMHO this one is better than my greenboxes...




[EDIT]

I "optisized" the code down to FIVE lines:

Code:
' FIVEliner by red_Marvin:
' DNAMATRIX
' runs OK on a P90
' color number = 65536 * blue + 256 * green + red
'---ENJOY!---
'
1 IF n = 0 THEN SCREEN 13 ELSE RANDOMIZE TIMER
2 IF n = 64 THEN x = INT(RND * 32) * 10 ELSE PALETTE n, n * 256
3 IF n = 64 THEN y = INT(RND * 199) + 1 ELSE n = n + 1
4 IF n = 64 THEN LINE (x, y)-(x + 5, y), (POINT(x, y - 2) + RND AND 63) * RND * 2 AND 63 ELSE GOTO 1
5 IF INKEY$ = "" THEN GOTO 2


Title: Challenge....
Post by: Agamemnus on May 25, 2003, 03:32:32 PM
nice.


Title: Challenge....
Post by: oracle on May 25, 2003, 09:18:55 PM
*rubs hands with glee*

Keep 'em coming!


Title: Challenge....
Post by: relsoft on May 26, 2003, 12:39:28 AM
So is this thread alive again?

*Tries to think of new gfx fx.......


Title: Challenge....
Post by: Hexadecimal Disaster on May 26, 2003, 03:48:11 AM
Quote from: "relsoft"
*Tries to think of new gfx fx.......


Please, Mr. Rel. Please use your valuable time in those people who're still waiting for your slice of the cake. Quite a few. You know.(http://www.handykult.de/plaudersmilies.de/eviltongue.gif)

*muffled voice* Joe! It's your turn now!


Title: Challenge....
Post by: toonski84 on May 26, 2003, 10:43:59 AM
*gets his fat ass off the couch away from the lethal weapon marathon on tv* awwwwwww......


Title: Challenge....
Post by: toonski84 on May 26, 2003, 12:47:40 PM
oh, what the hell, here's a crappy 9-line matrix:

Code:
1 DEF SEG = &HB800
2 FOR x = 4000 TO 0 STEP -2
3  IF x <= 24 THEN OUT &H3C9, -(((x \ 2) MOD 3) = 2) * 15 * (4 - x \ 6 - 1) ELSE OUT &H3C8, 0
4  IF PEEK(x + 1) > 0 THEN POKE x + 161, PEEK(x + 1)
5  IF PEEK(x + 1) > 0 THEN POKE x + 1, PEEK(x + 161) - 1 ELSE POKE INT(RND * 1999) * 2, INT(RND * 9) + 48
6  IF x MOD 250 = 0 THEN POKE INT(RND * 319) * 2 + 1, 3 ELSE n = 1
7 NEXT
8 FOR x = 0 TO 100000: NEXT
9 IF INKEY$ = "" THEN GOTO 2


remember, if it doesnt have a label in front it ain't a line break.


Title: Challenge....
Post by: Mango on May 26, 2003, 09:07:57 PM
try this one...I lifted the idea...from a 27 line prog I found on the net...

Code:
1 if g = 0 then SCREEN 12 else rot = rot + .1
2 rot2 = rot2 + .1 + .2 * p
3 FOR g = -8 TO 8
4 IF rot2 > 25.1 OR rot2 < 0 THEN p = NOT p ELSE CIRCLE ((320 + 10 * rot2 * SIN(1 * rot)) + ((9 - ABS(g)) * SGN(g) * 6) * SIN(rot), (350 + 10 * SIN(1 * rot)) + (((9 - ABS(g)) * SGN(g) * 2) + 4) * SIN(rot)), 9 - ABS(g), ABS(14 - 4 * ABS(g))
5 CIRCLE ((160) + ((9 - ABS(g)) * SGN(g) * 10) * COS(rot), (400 + -30 * SIN(1 * rot)) + (((9 - ABS(g)) * SGN(g) * 2) + 4) * SIN(rot)), 9 - ABS(g), 1 + ABS(g)
6 CIRCLE ((480) + ((9 - ABS(g)) * SGN(g) * 10) * COS(rot), (400 + 30 * SIN(1 * rot)) + (((9 - ABS(g)) * SGN(g) * 2) + 4) * SIN(rot)), 9 - ABS(g), 1 + ABS(g)
7 NEXT g
8 IF INKEY$ = "" THEN PRINT  ELSE END
9 GOTO 1


Title: Challenge....
Post by: toonski84 on May 26, 2003, 09:44:56 PM
hey mango, no problem.  change the first line to this

Code:
1 if g = 0 then screen 12 else rot = rot + .1


Title: Challenge....
Post by: Mango on May 26, 2003, 11:55:43 PM
Quote from: "toonski84"
hey mango, no problem.  change the first line to this

Code:
1 if g = 0 then screen 12 else rot = rot + .1


Thanks toonski...I couldn't figure it out...the solution was so obvious.    I didn't want to lose  a 3d thingie and couldn't see a way to keep all 3 plus have the center one wobble without getting rid of the screen line.  

What'd you think of the graphic?  

There's a bug that I can't fix as a 9-liner...at the min and max of the wobble (where (p) goes to (NOT p))  the center rotor doesn't show...it only shows up as 1/250 cycles, so it's not that distracting...do you see a way to do line 4 so that I can still do the comparison while and still printing the circle?


Title: Challenge....
Post by: toonski84 on May 27, 2003, 12:19:23 AM
it looked fine to me, it was pretty cool, reminded me of a dna pattern.


Title: Challenge....
Post by: oracle on May 27, 2003, 01:09:06 AM
Yeah, the DNA was cool.

Toonski: Line 8:
Code:
WAIT &H3DA, 8
is a little better than your count-delay  :wink:


Title: Challenge....
Post by: toonski84 on May 27, 2003, 01:11:59 AM
i was afraid to test it in text mode *tests* yeah, it's too fast on mine.


Title: Challenge....
Post by: relsoft on May 27, 2003, 02:36:14 AM
Quote from: "Hexadecimal Disaster"
Quote from: "relsoft"
*Tries to think of new gfx fx.......


Please, Mr. Rel. Please use your valuable time in those people who're still waiting for your slice of the cake. Quite a few. You know.(http://www.handykult.de/plaudersmilies.de/eviltongue.gif)

*muffled voice* Joe! It's your turn now!


Okay, okay... I won't enter any fx here until I put sumthing in the bunker.

These 9 liners nearly killed RelLib. :*)