02-01-2003, 10:15 PM
02-01-2003, 11:24 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.
02-01-2003, 11:26 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.
02-02-2003, 01:56 AM
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....
02-02-2003, 03:04 AM
Antoni: What next, a full 30 level game in 9 lines? ;-) Great work
02-02-2003, 03:07 AM
Quote:floormapper = teh beautifulCode:'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....
02-02-2003, 03:43 AM
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?
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?
02-02-2003, 03:55 AM
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...
02-02-2003, 08:04 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!!!!!!!
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!!!!!!!
02-02-2003, 09:34 AM
3D ssstarsss
maybe I'll try fire ;d -- that was fun
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