Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Challenge....
#21
whoah!
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#22
Rel: Can I post more than once?

Code:
1 IF re THEN CLEAR  ELSE SCREEN 13
2 x = RND * 320
3 y = RND * 199
4 im2 = im * im
5 im = 2 * re * im + (y / 100 - 1)
6 re = re * re - im2 + (x / 120 - 1.9)
7 iter% = iter% + 1
8 IF ABS(re) + ABS(im) > 2 OR iter% > 254 THEN PSET (x, y), iter% ELSE GOTO 4
9 IF LEN(INKEY$) = 0 THEN GOTO 1
Antoni
Reply
#23
Quote: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.
Reply
#24
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...)
Reply
#25
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.
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply
#26
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#27
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!!!!
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#28
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
Antoni
Reply
#29
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
Reply
#30
Quote:wizardlife, is your whole screensaver a box in the center? Sad

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


Forum Jump:


Users browsing this thread: 1 Guest(s)