Qbasicnews.com

Full Version: Challenge....
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
whistles@wizardlife's mobius strip... daaaang.
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.
i know antoni Smile i was referring to the fact that you have a particle system going without any do/loop or for/next loop.
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....
Antoni: What next, a full 30 level game in 9 lines? ;-) Great work
Quote:
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
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? Big Grin
Quote: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...
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!!!!!!!
3D ssstarsss Big Grin

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
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22