Qbasicnews.com
September 27, 2020, 04:18:14 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 ... 9 10 [11] 12 13 ... 15
  Print  
Author Topic: Challenge....  (Read 68687 times)
biskbart
New Member

Posts: 13


WWW
« Reply #150 on: February 13, 2003, 04:09:14 AM »

I decided to compil nearly all the programs in a ZIP file because it was not very useful. You can find it on
biskbart.free.fr
Logged

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



WWW
« Reply #151 on: February 13, 2003, 06:07:53 PM »

To have the right to do it you must post a demo! :wink:
Logged

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



WWW
« Reply #152 on: February 14, 2003, 02:21:52 AM »

Yay!!! Biskbart's alive!!!!!

:*)

Post dude!!!

 :rotfl:
Logged

y smiley is 24 bit.


Genso's Junkyard:
http://rel.betterwebber.com/
Neo
Na_th_an
*****
Posts: 2150



« Reply #153 on: February 14, 2003, 08:33:30 AM »

HEY  Cool finally I see him somewhere LoL

mmmmrh hrmmmm, *looks on HD*, I still have his cool Demo for the QB Demo Contest 2001. However, the Piano tune gets more irritating...
Logged
BlueKeyboard
Wandering Guru
***
Posts: 337



WWW
« Reply #154 on: February 14, 2003, 09:38:14 AM »

Here is my "impossible circle" Cheesy.
Code:

1 SCREEN 13
2 M$ =  "19171819202122232425262728293031191718192021222324252627282930311917181920212223242526272829303119171819202122232425262728293031191718192021222324252627282930311917181920212223242526272829303119171819202122232425262728293031191718192021222324252627282930311917181920212223242526272829303119171819202122232425262728293031191718192021222324252627282930311917181920212223242526272829303119171819202122232425262728293031191718192021222324252627282930311917181920212223242526272829303119171819202122232425262728293031"
3 DO
4 FOR A! = 0 TO 25 STEP .01
5 FOR Y% = 0 TO 15
6 FOR X% = 0 TO 15
7 PSET (160 + COS(A!) * 50 + X%, 100 + SIN(A!) * 50 + Y%), VAL(MID$(M$, ((Y% * 2) * 16) + (X% * 2) + 1, 2))
8 NEXT X%, Y%, A!
9 LOOP
Logged

biskbart
New Member

Posts: 13


WWW
« Reply #155 on: February 14, 2003, 09:40:30 AM »

An ugly fire effect. Sorry

Code:

1 SCREEN 13
2 DEF SEG = &HA000
3 FOR I& = 50000 TO 63999 + 640
4 IF I& < 50768 THEN OUT &H3C9, (I& - 50000) \ 12
5 IF I& > 63950 THEN POKE 63999 + RND * 640, 250
6 POKE I&, (PEEK(I&) + PEEK(I& + 319) + PEEK(I& + 320) + PEEK(I& + 321)) * .235
7 NEXT I&
8 IF INKEY$ = "" THEN 30
Logged

iskbart
Agamemnus
x/ \z
*****
Posts: 3491



« Reply #156 on: February 14, 2003, 10:51:27 PM »

Key,
It's obviously not a circle.


It's 2 interlocked rings.

BTW,

Where's the exit condition?

bikbart,
Line 3.
Logged

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.
someone42
Member
*
Posts: 44


« Reply #157 on: February 15, 2003, 05:05:54 AM »

Hey all those graphic demos are real good, especially since they only take up 9 lines!

Anyways here's mine:


Code:
' Explosion screensaver by someone42
1 SCREEN 13
2 DIM p(255) AS LONG, A AS STRING * 4104
3 IF x& = 0 THEN CLS  ELSE IF x& MOD 256 = 0 THEN PALETTE USING p(0)
4 IF x& < 128 AND x& > 0 THEN p(x&) = ((64 - x& * 2 + 1) AND NOT (((64 - x& * 2 + 1) AND &HFF00) \ 256)) * 65536 + ((95 - x&) AND &H3F AND NOT (((95 - x&) AND &HFF00) \ 256) OR (((x& - 32) AND &H3F00) \ 256)) * 256 + ((256 - 2 * x& - 1) AND &H3F OR  _
(((x& - 96) AND &H3F00) \ 256)) ELSE IF x& > 639 AND ((x& - 384) \ 256) > ((x& - 384) AND 255) THEN p((x& - 384) AND 255) = ((NOT SGN(p((x& - 384) AND 255) - &H40000)) AND (p((x& - 384) AND 255) - &H40000) AND &H3F0000) + ((NOT SGN((p((x& - 384) AND _
 255) AND &HFF00) - 1024)) AND (p((x& - 384) AND 255) - 1024) AND &H3F00) + ((NOT SGN((p((x& - 384) AND 255) AND 255) - 4)) AND (p((x& - 384) AND 255) - 4) AND 63)
5 IF x& < 384 AND x& > 127 THEN MID$(A, (x& - 128) * 16 + 1, 24) = MKS$(RND * 6.28318 - 3.14159) + MKS$(RND / 2) + MKI$(CVS(MID$(A, 1, 4)) * 3259.496) + MKI$(CVS(MID$(A, 5, 4)) * 12800 - 6400) + MKI$(SIN(CVS(MID$(A, (x& - 128) * 16 + 1, 4))) * CVS( _
MID$(A, (x& - 128) * 16 + 5, 4)) * 512) + MKI$(COS(CVS(MID$(A, (x& - 128) * 16 + 1, 4))) * CVS(MID$(A, (x& - 128) * 16 + 5, 4)) * 384) + MKS$(RND * 6.28318 - 3.14159) + MKS$(RND / 2)
6 IF x& > 383 THEN MID$(A, ((x& - 384) AND 255) * 16 + 9, 8) = MKI$(CVI(MID$(A, ((x& - 384) AND 255) * 16 + 9, 2)) + CVI(MID$(A, ((x& - 384) AND 255) * 16 + 13, 2))) + MKI$(CVI(MID$(A, ((x& - 384) AND 255) * 16 + 11, 2)) + CVI(MID$(A, ((x& - 384)  _
MOD 256) * 16 + 15, 2))) + MKI$(CVI(MID$(A, ((x& - 384) MOD 256) * 16 + 13, 2)) * .98) + MKI$(CVI(MID$(A, ((x& - 384) MOD 256) * 16 + 15, 2)) * .98)
7 IF x& > 383 AND (x& - 384) MOD 256 <> 0 THEN CIRCLE ((CVI(MID$(A, ((x& - 384) AND 255) * 16 + 9, 2)) + 10240) / 64, (CVI(MID$(A, ((x& - 384) AND 255) * 16 + 11, 2)) + 12800) / 64), 1, (x& - 384) \ 256
8 x& = (x& + 1) MOD 32897
9 IF INKEY$ = "" THEN 3


Hehe sorry about the length - my original program was 52 lines and it took a lot of trouble to get it down to 9. Yeah and I know the IF...THEN...ELSE...IF...THEN thing is a really cheesy hack to fit more into one line, but there was no other way to do it. It may run a bit slow (it's about 6 times slower than the original, uncompressed program!)
Logged
toonski84
__/--\__
*****
Posts: 2567



« Reply #158 on: February 15, 2003, 12:59:11 PM »

hey, that's an awesome demo, someone42!  got any other programs that arent 9 lines?
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
Lanzaa
Forum Regular
**
Posts: 105



« Reply #159 on: February 15, 2003, 01:31:03 PM »

hey i just wanted to point something out to bluekeyboard
use the "If inkey$ = "" goto 4" or what ever instead of do...loop

Code:
1 SCREEN 13
2 M$ =  "19171819202122232425262728293031191718192021222324252627282930311917181920212223242526272829303119171819202122232425262728293031191718192021222324252627282930311917181920212223242526272829303119171819202122232425262728293031191718192021222324252627282930311917181920212223242526272829303119171819202122232425262728293031191718192021222324252627282930311917181920212223242526272829303119171819202122232425262728293031191718192021222324252627282930311917181920212223242526272829303119171819202122232425262728293031"  
4 FOR A! = 0 TO 25 STEP .01
5 FOR Y% = 0 TO 15
6 FOR X% = 0 TO 15
7 PSET (160 + COS(A!) * 50 + X%, 100 + SIN(A!) * 50 + Y%), VAL(MID$(M$, ((Y% * 2) * 16) + (X% * 2) + 1, 2))
8 NEXT X%, Y%, A!
9 If inkey$ = "" goto 4


cuts down a line of code which you can use and makes it so you can exit Cool
Logged
someone42
Member
*
Posts: 44


« Reply #160 on: February 16, 2003, 01:59:34 AM »

Quote
got any other programs that arent 9 lines?


Well, if you're talking about graphic demos, not really. But usually I just program bits and pieces of graphical/sound/network junk.
Of course that means I have over 200 files sitting in \QB45 Smiley

Well, here's another one based around the same concepts:
Code:
' Crackler screensaver by someone42
1 SCREEN 9
2 a$ = MKI$(320) + MKI$(175) + MKI$(1) + MKI$(1) + STRING$(12288, 0)
3 IF x& MOD 128 = 0 THEN MID$(a$, 1, 8) = MKI$(CVI(MID$(a$, 1, 2)) + CVI(MID$(a$, 5, 2))) + MKI$(CVI(MID$(a$, 3, 2)) + CVI(MID$(a$, 7, 2))) + MID$(a$, 5, 4)
4 IF x& MOD 128 = 0 THEN MID$(a$, 5, 4) = MKI$((2 * ((0 > CVI(MID$(a$, 1, 2))) OR (640 < CVI(MID$(a$, 1, 2)))) + 1) * CVI(MID$(a$, 5, 2))) + MKI$((2 * (0 > CVI(MID$(a$, 3, 2)) OR 350 < CVI(MID$(a$, 3, 2))) + 1) * CVI(MID$(a$, 7, 2)))
5 IF MID$(a$, x& * 12 + 19, 2) = STRING$(2, 0) THEN MID$(a$, x& * 12 + 9, 12) = MKI$((CVI(MID$(a$, 1, 2)) - 320) * 64) + MKI$((CVI(MID$(a$, 3, 2)) - 175) * 64) + MKI$(RND * 512 - 256) + MKI$(RND * 512 - 256) + MKI$(RND * 15 + 1) + MKI$(RND * 24 + 4) _
 ELSE MID$(a$, x& * 12 + 9, 12) = MKI$(CVI(MID$(a$, x& * 12 + 9, 2)) + CVI(MID$(a$, x& * 12 + 13, 2))) + MKI$(CVI(MID$(a$, x& * 12 + 11, 2)) + CVI(MID$(a$, x& * 12 + 15, 2))) + MID$(a$, x& * 12 + 13, 6) + MKI$(CVI(MID$(a$, x& * 12 + 19, 2)) - 1)
6 IF MID$(a$, x& * 12 + 19, 2) <> STRING$(2, 0) THEN PSET (CVI(MID$(a$, x& * 12 + 9, 2)) \ 64 + 320, CVI(MID$(a$, x& * 12 + 11, 2)) \ 64 + 175), CVI(MID$(a$, x& * 12 + 17, 2))
7 PSET ((CVI(MID$(a$, x& * 12 + 9, 2)) - CVI(MID$(a$, x& * 12 + 13, 2))) \ 64 + 320, (CVI(MID$(a$, x& * 12 + 11, 2)) - CVI(MID$(a$, x& * 12 + 15, 2))) \ 64 + 175), 0
8 x& = (x& + 1) MOD 1024
9 IF INKEY$ = "" THEN 3
Logged
BlueKeyboard
Wandering Guru
***
Posts: 337



WWW
« Reply #161 on: February 16, 2003, 12:46:22 PM »

Quote from: "Agamemnus"

Key,
It's obviously not a circle.


It's 2 interlocked rings.


That is a circle....
Oh and just CTRL+Break.

Quote from: "lanzaa"

hey i just wanted to point something out to bluekeyboard
use the "If inkey$ = "" goto 4" or what ever instead of do...loop

I know, it was 8 lines first, but I made it to 9 lines Cheesy(but I don't know ....whySmiley).
Logged

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



« Reply #162 on: February 16, 2003, 01:40:00 PM »

hahaha!! seriously, someone, that's awesome!!

how long have you been coding?
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 #163 on: February 16, 2003, 09:00:37 PM »

Code:

'Antoni Gual, from an idea  by Steve Nunnaly

1 IF i THEN CIRCLE (160, 100), i, (i MOD 16) + 32, , , .8 ELSE SCREEN 13
2 i = i + 1
3 IF i < 200 THEN GOTO 1 ELSE DIM b2%(5000)
4 w = (w + .3)
5 xmid = 140 + SIN(7 * w / 1000) * 110
6 ymid = 80 + SIN(11 * w / 1000) * 59
7 GET ((xmid - (SIN(w) * 28)), (ymid - (COS(w) * 20)))-((xmid - (SIN(w) * 28)) + 40, (ymid - (COS(w) * 20)) + 40), b2%
8 PUT ((xmid - (SIN(w - .04) * 27.16)), (ymid - (COS(w - .04) * 19.4))), b2%, PSET
9 IF LEN(INKEY$) = 0 THEN GOTO 4
Logged

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



WWW
« Reply #164 on: February 17, 2003, 02:02:31 AM »

Kewl Additions guys!!!

I knew of "Someone"  who likes to 42 people.....

hmmmmm.......

 Smiley
Logged

y smiley is 24 bit.


Genso's Junkyard:
http://rel.betterwebber.com/
Pages: 1 ... 9 10 [11] 12 13 ... 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!