Posts: 440
Threads: 65
Joined: Sep 2001
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
Posts: 3,368
Threads: 195
Joined: Jan 2003
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.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."
Visit www.neobasic.net to see rubbish in all its finest.
Posts: 720
Threads: 46
Joined: Oct 2001
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!
Posts: 3,288
Threads: 167
Joined: Nov 2001
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
Posts: 3,288
Threads: 167
Joined: Nov 2001
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!!!!!
Posts: 1,407
Threads: 117
Joined: Dec 2002
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
Antoni
Posts: 1,407
Threads: 117
Joined: Dec 2002
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
Antoni
Posts: 2,020
Threads: 24
Joined: Jun 2002
: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]"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
Posts: 720
Threads: 46
Joined: Oct 2001
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.
Posts: 720
Threads: 46
Joined: Oct 2001
Quote::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
|