Qbasicnews.com
November 21, 2019, 08:07:22 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: 1 2 3 [4] 5 6 ... 15
  Print  
Author Topic: Challenge....  (Read 63588 times)
Antoni Gual
Na_th_an
*****
Posts: 1434



WWW
« Reply #45 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
Logged

Antoni
Antoni Gual
Na_th_an
*****
Posts: 1434



WWW
« Reply #46 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

Logged

Antoni
toonski84
__/--\__
*****
Posts: 2567



« Reply #47 on: February 01, 2003, 11:24:46 AM »

Shocked  ... i have to say that's the only and best 3d starfield i've ever seen to operate without a single loop in it.
Logged

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
wizardlife
Na_th_an
*****
Posts: 1456


WWW
« Reply #48 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.
Logged

wizardlife
Na_th_an
*****
Posts: 1456


WWW
« Reply #49 on: February 01, 2003, 01:56:59 PM »

Quote from: "toonski84"
Shocked  ... 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
Logged

toonski84
__/--\__
*****
Posts: 2567



« Reply #50 on: February 01, 2003, 02:15:25 PM »

whistles@wizardlife's mobius strip...  daaaang.
Logged

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
Antoni Gual
Na_th_an
*****
Posts: 1434



WWW
« Reply #51 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.
Logged

Antoni
toonski84
__/--\__
*****
Posts: 2567



« Reply #52 on: February 01, 2003, 03:26:17 PM »

i know antoni Smiley  i was referring to the fact that you have a particle system going without any do/loop or for/next loop.
Logged

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
Antoni Gual
Na_th_an
*****
Posts: 1434



WWW
« Reply #53 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....
Logged

Antoni
wildcard
*.*
Administrator
__/--\__
*****
Posts: 2369



« Reply #54 on: February 01, 2003, 07:04:59 PM »

Antoni: What next, a full 30 level game in 9 lines? ;-) Great work
Logged
wizardlife
Na_th_an
*****
Posts: 1456


WWW
« Reply #55 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
Logged

Antoni Gual
Na_th_an
*****
Posts: 1434



WWW
« Reply #56 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?   Cheesy
Logged

Antoni
wizardlife
Na_th_an
*****
Posts: 1456


WWW
« Reply #57 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...
Logged

relsoft
*/-\*
*****
Posts: 3927



WWW
« Reply #58 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!!!!!!!
Logged

y smiley is 24 bit.


Genso's Junkyard:
http://rel.betterwebber.com/
Lithium
Forum Regular
**
Posts: 123


« Reply #59 on: February 02, 2003, 01:34:31 AM »

3D ssstarsss  Cheesy

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
Logged

COUNT HACKED BY RAZVEEE

RAZVEE IS A SCRIPT KIDDIE- hacker9
Pages: 1 2 3 [4] 5 6 ... 15
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!