Qbasicnews Forum Index Qbasicnews
Back to QbasicNews.com
QBOHO
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   You have no new messagesYou have no new messages   Log out [ relsoft ]Log out [ relsoft ] 

Challenge....
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
 
Post new topic   Reply to topic    Qbasicnews Forum Index -> Challenges
View previous topic :: View next topic  
Author Message
toonski84
I hold this place together


Joined: 31 May 2002
Posts: 977
Location: Melbourne, Florida

PostPosted: 01 Feb 2003 17:15    Post subject: Reply with quote

whistles@wizardlife's mobius strip... daaaang.
_________________
D.A.M.M. - Drunks Against Mad Mothers
Back to top
View user's profile Send private message
Antoni Gual
Forum Regular


Joined: 08 Dec 2002
Posts: 90
Location: Barcelona, Spain

PostPosted: 01 Feb 2003 18:24    Post subject: Reply with quote

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.
_________________
Antoni
Back to top
View user's profile Send private message Visit poster's website
toonski84
I hold this place together


Joined: 31 May 2002
Posts: 977
Location: Melbourne, Florida

PostPosted: 01 Feb 2003 18:26    Post subject: Reply with quote

i know antoni icon_smile.gif i was referring to the fact that you have a particle system going without any do/loop or for/next loop.
_________________
D.A.M.M. - Drunks Against Mad Mothers
Back to top
View user's profile Send private message
Antoni Gual
Forum Regular


Joined: 08 Dec 2002
Posts: 90
Location: Barcelona, Spain

PostPosted: 01 Feb 2003 20:56    Post subject: A sloooooow floormapper .. Reply with 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....
_________________
Antoni
Back to top
View user's profile Send private message Visit poster's website
wildcard
mal


Joined: 01 Aug 2001
Posts: 1133
Location: England

PostPosted: 01 Feb 2003 22:04    Post subject: Reply with quote

Antoni: What next, a full 30 level game in 9 lines? icon_wink.gif Great work
_________________
Professionalism is an illusion, not a method; so make like a magician
Back to top
View user's profile Send private message Send e-mail Visit poster's website
wizardlife
Desert Wanderer


Joined: 09 Oct 2001
Posts: 846
Location: Toronto, Canada

PostPosted: 01 Feb 2003 22:07    Post subject: Re: A sloooooow floormapper .. Reply with quote

Antoni Gual wrote:
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
_________________
w i z a r d c o d e o n l i n e
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Antoni Gual
Forum Regular


Joined: 08 Dec 2002
Posts: 90
Location: Barcelona, Spain

PostPosted: 01 Feb 2003 22:43    Post subject: RAW bitmap loader and ripple effect in 7 lines. Reply with 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....

As Wilcard would kill me if I posted a 307 lines program, I uploaded it to my page.

For those curious it is at:
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? icon_biggrin.gif
_________________
Antoni
Back to top
View user's profile Send private message Visit poster's website
wizardlife
Desert Wanderer


Joined: 09 Oct 2001
Posts: 846
Location: Toronto, Canada

PostPosted: 01 Feb 2003 22:55    Post subject: Re: RAW bitmap loader and ripple effect in 7 lines. Reply with quote

Antoni Gual wrote:
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...
_________________
w i z a r d c o d e o n l i n e
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
relsoft
Sanzo


Joined: 05 Nov 2001
Posts: 764
Location: Philippines

PostPosted: 02 Feb 2003 03:04    Post subject: Reply with quote Edit/Delete this post

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!!!!!!!
_________________
Medium or Rare?




Mysite:
Genso' Junkyard
Our game: Frantic Journey

New FJ Screenies:
http://polacka.xepher.net/
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Lithium
New Member


Joined: 01 Aug 2001
Posts: 16
Location: Nova Scotia - Canada

PostPosted: 02 Feb 2003 04:34    Post subject: my entry Reply with quote

3D ssstarsss icon_biggrin.gif

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Antoni Gual
Forum Regular


Joined: 08 Dec 2002
Posts: 90
Location: Barcelona, Spain

PostPosted: 02 Feb 2003 05:30    Post subject: Reply with quote

Oh-oh. Lithium there... icon_eek.gif Fasten your seat belts! bounce_smile.gif
_________________
Antoni
Back to top
View user's profile Send private message Visit poster's website
Lithium
New Member


Joined: 01 Aug 2001
Posts: 16
Location: Nova Scotia - Canada

PostPosted: 02 Feb 2003 06:09    Post subject: Here's "fire" Reply with quote

Code:
1 SCREEN 13
2 x% = (x% + 1) AND 32767
3 if c& < 255 then palette c&, c&\4 else if c& = 255 then def seg = &ha000
4 c& = c& + 1
5 line (x%\20, 101)-step(0, -3), (rnd * 32)+abs(sin(timer*16))*222
6 o% = (o% + 1) AND 32767
7 if c& => 255 then poke o%, (peek(o%) + peek(o%-1) + peek(o%+1) + peek(o%+320)) \ 4
8 if c& => 255 then poke 64000-o%, peek(o%)
9 if inkey$ = "" then goto 2


it sucks[/code]
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Lithium
New Member


Joined: 01 Aug 2001
Posts: 16
Location: Nova Scotia - Canada

PostPosted: 02 Feb 2003 08:48    Post subject: the never ending hello Reply with quote

Code:
1 Msg$ = "0AAAA00AAAA00AAAA00000000AAAA00AAAA00000000AAAAA0AAAAA000AAA0AAAAA00000000AA0000AA0000AA0000AA0000AA0000AA0000000000AA0000AA0000AA0000AA00000000"
2 SCREEN 13
3 i = (i + 1) MOD 36
4 IF i = 0 AND (j + 1) = 4 THEN sz = RND * 16
5 IF i = 0 AND (j + 1) = 4 THEN clr = (TIMER * 32) MOD 255
6 IF i = 0 AND (j + 1) = 4 THEN ps = RND * 64000
7 IF i = 0 THEN j = (j + 1) MOD 4
8 IF MID$(Msg$, j * 36 + i + 1, 1) = "0" THEN LINE ((ps MOD 320) + (i MOD 6) * sz + j * (sz * 8), FIX(ps / 320) + FIX(i / 6) * sz)-STEP(sz, sz), clr, BF
9 IF INKEY$ = "" GOTO 3


yar

rolling_smile.gif i'm tired rolling_smile.gif
Back to top
View user's profile Send private message Send e-mail Visit poster's website
relsoft
Sanzo


Joined: 05 Nov 2001
Posts: 764
Location: Philippines

PostPosted: 02 Feb 2003 09:13    Post subject: Reply with quote Edit/Delete this post

Finally!!!!!!

Now that Lith's here...

I wouldn't be surprised if we get to see the MMS and Bluecastle members posting here!!!

Yay!!! Keep it coming!!!!!

Dav: Would it be possible for me to make a zip of all these files along with the authors names and submit it to your site?
_________________
Medium or Rare?




Mysite:
Genso' Junkyard
Our game: Frantic Journey

New FJ Screenies:
http://polacka.xepher.net/
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Lithium
New Member


Joined: 01 Aug 2001
Posts: 16
Location: Nova Scotia - Canada

PostPosted: 02 Feb 2003 10:01    Post subject: Reply with quote

this is my last one for tonight

Code:
1 Smiley$ = "þþþþ*+++,,,þþþþþþþ*+++,,,,,,,þþþþ*++,þ,,,þ,,,,þþþ*+,,þ,,,þ,,,,þþ*++,,þ,,,þ,,,,,þ*+þ,,þ,,,þ,,þ,,þ*þþ,,,,,,,,,þþ,þ*+þ,,,,,,,,,þ,,þ*++þ,,,,,,,þ,,,þþ*+,þ,,,,,þ,,,þþþ*++,þþþþþ,,,,þþþþ*+++,,,,,,,þþþþþþþ*+++,,,þþþþþþþþþþþþþþþþþþþþþ"
2 SCREEN 13
3 sz = ABS(SIN(TIMER)) * 10 + 3 ' sz = INT(ABS(SIN(TIMER)) * 10 + 3
4 ps = 0
5 i = (i + 1) MOD 224
6 IF (i = 0) AND (ps MOD 320 + int(sz) * 16) >= 320 THEN ps = (FIX(ps / 320) + int(sz) * 14) * 320 ELSE IF i = 0 THEN ps = ps + int(sz) * 16
7 LINE ((ps MOD 320) + (i MOD 16) * sz + j * (sz * 8), FIX(ps / 320) + FIX(i / 16) * sz)-STEP(sz, sz), ASC(MID$(Smiley$, i + 1, 1)), BF
8 IF (ps > 64000) AND (i = 0) THEN GOTO 3
9 IF INKEY$ = "" GOTO 5


zooming tiled smiley face

get rid of the flicker by adding an INT() around ABS(SIN(TIMER))*10+3, but that makes it jerky..
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ak00ma
Senior Member


Joined: 23 Oct 2002
Posts: 132
Location: Germany

PostPosted: 02 Feb 2003 10:34    Post subject: Reply with quote

Hey, this is my code. It's like a little smoother
Code:

1 SCREEN 13
2 DEF SEG = &HA000
3 FOR n& = 0 TO 65000
4  POKE n&, INT(RND * 256)
5 NEXT n&
6 FOR n& = 0 TO 64000
7  POKE n&, (PEEK(n& - 1) + PEEK(n&) + PEEK(n& + 1) + PEEK(n& + 320) + PEEK(n& - 320)) \ 5
8 NEXT n&
9 GOTO 6

_________________
QB 4 EVER

http://www.q-tech.de.vu/
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Antoni Gual
Forum Regular


Joined: 08 Dec 2002
Posts: 90
Location: Barcelona, Spain

PostPosted: 02 Feb 2003 12:01    Post subject: Reply with quote

Lithium: Your smiley zoom is great!

While waiting for Nathan's fire...
Code:

'Lissajous by Antoni Gual
1 IF k = 0 THEN SCREEN 12 ELSE CLS
2 i& = (i& + 1) AND &HFFFFF
3 k = 6.3 * RND
4 l = 6.3 * RND
5 n% = (n% + 1) MOD 15
6 FOR j& = 0 TO 100000
7 PSET (320 + 300 * SIN(.01 * SIN(k) + j&), 240 + 200 * SIN(.01 * SIN(l) * j&)), n% + 1
8 NEXT
9 IF LEN(INKEY$) = 0 THEN GOTO 1


_________________
Antoni
Back to top
View user's profile Send private message Visit poster's website
Dav
Webmaster


Joined: 08 Sep 2001
Posts: 200
Location: USA

PostPosted: 02 Feb 2003 13:22    Post subject: Reply with quote

relsoft wrote:

Dav: Would it be possible for me to make a zip of all these files along with the authors names and submit it to your site?


Good idea! Yes, please do. icon_smile.gif

- Dav
Back to top
View user's profile Send private message Send e-mail Visit poster's website
toonski84
I hold this place together


Joined: 31 May 2002
Posts: 977
Location: Melbourne, Florida

PostPosted: 02 Feb 2003 14:22    Post subject: Reply with quote

well, here's a shot at 9-line fire, but i could only get it down to 10 lines. if you dont mind bright, multicolored fire you can take out the fire code. and since it went super-slow on my 1.8gig, it's probably going to go even slower on other computers.

Code:

' 10 line fire by jofers
1 SCREEN 13
2 FOR i = 0 TO 255
3  PALETTE i, i \ 4
4 NEXT i
5 PSET (x, 199), CINT(RND) * 255
6 FOR i = 198 TO 100 STEP -1
7  PSET (x, i), (POINT(x, i + 1) + POINT(x + 1, i + 1) + POINT(x + 1, i - 1) + POINT(x, i) + POINT(x, i + 2)) / 5
8 NEXT i
9 x = (x + 1) MOD 320
10 IF INKEY$ = "" THEN GOTO 5

_________________
D.A.M.M. - Drunks Against Mad Mothers
Back to top
View user's profile Send private message
toonski84
I hold this place together


Joined: 31 May 2002
Posts: 977
Location: Melbourne, Florida

PostPosted: 02 Feb 2003 14:30    Post subject: Reply with quote

never mind, i got it down to 9 icon_smile.gif

Code:

1 SCREEN 13
2 FOR a = 0 TO 255
3  PALETTE a, a \ 4
4 NEXT a
5 PSET (x, 199), CINT(RND) * 255
6 PSET (x, 198 - i), (POINT(x, 198 - i + 1) + POINT(x + 1, 198 - i + 1) + POINT(x + 1, 198 - i - 1) + POINT(x, 198 - i) + POINT(x, 198 - i + 2)) / 5
7 x = (x + 1) MOD 320
8 IF x = 0 THEN i = (i + 1) MOD 98
9 IF INKEY$ = "" THEN GOTO 5

_________________
D.A.M.M. - Drunks Against Mad Mothers
Back to top
View user's profile Send private message
Antoni Gual
Forum Regular


Joined: 08 Dec 2002
Posts: 90
Location: Barcelona, Spain

PostPosted: 02 Feb 2003 15:47    Post subject: We need Balls to keep the pace of this challenge! Reply with quote

Code:

'balls by Antoni Gual    agual@eic.ictnet.es
1  IF p% >= 16 THEN 3 ELSE IF p% = 0 THEN SCREEN 12 ELSE PALETTE p% - 1, b&
2  READ p%, b&
3  IF p% < 16 THEN GOTO 9 ELSE a$ = MKI$(RND * 640 + 1) + MKI$(RND * 480) + MKS$((RND * 60) + 20) + MKI$(INT(RND * 4) * 4) + MKS$(RND * 3.141592) + MKS$(RND * 3.141592 / 1.5)
4 FOR i% = -INT(CVS(MID$(a$, 5))) TO INT(CVS(MID$(a$, 5)))
5  FOR j% = -INT(SQR(CVS(MID$(a$, 5)) ^ 2 - i% ^ 2)) TO INT(SQR(CVS(MID$(a$, 5)) ^ 2 - i% ^ 2))
6   c! = 3 * (COS(CVS(MID$(a$, 11))) * SIN(CVS(MID$(a$, 15))) * i% / CVS(MID$(a$, 5)) + SIN(CVS(MID$(a$, 11))) * SIN(CVS(MID$(a$, 15))) * j% / CVS(MID$(a$, 5)) + COS(CVS(MID$(a$, 15))) * SQR(1.11 - (i% / CVS(MID$(a$, 5))) ^ 2 - (j% / CVS(MID$(a$, 5) _
)) ^ 2))
7   PSET (CVI(MID$(a$, 1)) + i%, CVI(MID$(a$, 3)) + j%), 1 + CVI(MID$(a$, 9)) + INT(c!) + (RND > (c! - INT(c!)))
8 NEXT j%, i%
9 IF LEN(INKEY$) = 0 THEN GOTO 1 ELSE DATA 1,&h5,2,&h10,3,&h20,4,&h30,5,&h500,6,&h1000,7,&h2000,8,&h3000,9,&h50000,10,&h100000,11,&h200000,12,&h300000,13,&h50505,14,&h101010,15,&h202020,16,&h303030,17,0

_________________
Antoni
Back to top
View user's profile Send private message Visit poster's website
toonski84
I hold this place together


Joined: 31 May 2002
Posts: 977
Location: Melbourne, Florida

PostPosted: 02 Feb 2003 16:14    Post subject: Reply with quote

egad. this filler challenge has become quite a phenomena. i dont think toshi's had this many entry (well, after the fourth one that happened but you get the idea)
_________________
D.A.M.M. - Drunks Against Mad Mothers
Back to top
View user's profile Send private message
Lithium
New Member


Joined: 01 Aug 2001
Posts: 16
Location: Nova Scotia - Canada

PostPosted: 02 Feb 2003 18:57    Post subject: Bouncing balls! Reply with quote

Code:
1 SCREEN 13
2 DIM ballx(50), bally(50), ballxv(50), ballyv(50)
3 i = (i + 1) MOD 50
4 IF ballx(i) = 0 THEN ballx(i) = RND * 320 ELSE IF bally(i) = 0 THEN bally(i) = RND * 320
5 IF ballxv(i) = 0 THEN ballxv(i) = RND * 10 - 5 ELSE IF ballyv(i) = 0 THEN ballyv(i) = RND * 10 - 5
6 IF (ballx(i) >= 320 AND ballxv(i) > 0) OR (ballx(i) <= 1 AND ballxv(i) < 0) THEN ballxv(i) = -ballxv(i) ELSE ballx(i) = ballx(i) + ballxv(i)
7 IF (bally(i) >= 200 AND ballyv(i) > 0) OR (bally(i) <= 1 AND ballyv(i) < 0) THEN ballyv(i) = -ballyv(i) ELSE bally(i) = bally(i) + ballyv(i)
8 CIRCLE (ballx(i), bally(i)), (TIMER / 16) MOD (i + 1), i MOD 15 + 16
9 IF INKEY$ = "" THEN GOTO 3

bounce_smile.gif bounce_smile.gif bounce_smile.gif bounce_smile.gif
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dav
Webmaster


Joined: 08 Sep 2001
Posts: 200
Location: USA

PostPosted: 02 Feb 2003 19:28    Post subject: Reply with quote

A cheap-o way to do a cheap-o fire effect in 8 lines.

Code:

1 FOR t = -1 TO 64
2   IF t = -1 THEN SCREEN 13 ELSE IF t = 64 THEN LINE (0, 189)-(319, 199), 60, BF ELSE PALETTE t, t
3 NEXT
4 FOR y% = 169 TO 189
5 FOR x% = 0 TO 319
6 IF x% = 319 AND y% = 189 THEN GOTO 4 ELSE c% = POINT(x%, y%) - RND * 8
7 IF c% >= 0 THEN PSET (x%, y% - 1), c% ELSE IF INKEY$ <> "" THEN END
8 NEXT x%, y%


You could change it easy to fill up the screen, but it would soooo slow.

Change the 169 in line 4 to a lower number, and the * 8 in line 6 to a lower number as well.

- Dav
Back to top
View user's profile Send private message Send e-mail Visit poster's website
toonski84
I hold this place together


Joined: 31 May 2002
Posts: 977
Location: Melbourne, Florida

PostPosted: 02 Feb 2003 22:07    Post subject: Reply with quote

if/then/else is *such* a cheap hack icon_razz.gif but it's definately faster than mine...
_________________
D.A.M.M. - Drunks Against Mad Mothers
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Qbasicnews Forum Index -> Challenges All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
Page 3 of 8
Stop watching this topic
 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum


Powered by phpBB 2.0.4 © 2001, 2002 phpBB Group