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
Code:
SCREEN 13
FOR I% = 1 TO 256
        OUT &H3C8, I%: OUT &H3C9, 0: OUT &H3C9, 0: OUT &H3C9, I% * 5
NEXT
DO
        A = INT(RND * 320) + 2
        B = INT(RND * 200) + 2
        LINE (A + SIN(A * 9), B + COS(B \ 9))-(A + COS(A \ 9), B + SIN B * 9)) , A * B \ B
LOOP
Here's my first entry, I just typed in a bunch of random variables and whatnot, and this is what it looked like.
Toonski: Woot!!!!! Wooot!!!!!

See it looks great in 80*50!!!!

some 3dwaves:

this is the 9 line Flickers code:

Code:
'The Waves..... By RelSoft 2003
'Relsoft.ath.cx

1  IF A% = 0 THEN SCREEN 12 ELSE DIM TX!(15, 15), TY!(15, 15)
2  A% = (A% + 10) MOD 360
3  LINE (0, 0)-(639, 479), 0, BF
4  FOR x% = 0 TO 14
5  FOR z% = 0 TO 15
6  PSET ((320 + ((x% * (1 / 15 * 640)) - 320) / ((z% * (1 / 15 * 640)) / 640 + 1)), (320 + ((150 + 25 * SIN((A% + (15 * (((x% - (N / 2)))) ^ 2 + ((z% - (N / 2))) ^ 2)) * (3.141593 / 180))) - 320) / ((z% * (1 / 15 * 640)) / 640 + 1))), 16 - (((z% * ( _
1 / 15 * 640)) / 640 + 1) - 1) * 15
7  NEXT z%, x%
8  WAIT &H3DA, 8
9  IF INKEY$ = "" THEN 2

This one is better looking but 10 lines so its disqualified:

Code:
'The Waves..... By RelSoft 2003
'Relsoft.ath.cx

1  IF A% = 0 THEN SCREEN 12 ELSE DIM TX!(15, 15), TY!(15, 15)
2  A% = (A% + 10) MOD 360
3  FOR x% = 0 TO 14
4  FOR z% = 0 TO 15
5  PSET (TX!(x%, z%), TY!(x%, z%)), 0
6  TX!(x%, z%) = 320 + ((x% * (1 / 15 * 640)) - 320) / ((z% * (1 / 15 * 640)) / 640 + 1)
7  TY!(x%, z%) = 320 + ((150 + 25 * SIN((A% + (15 * (((x% - (N / 2)))) ^ 2 + ((z% - (N / 2))) ^ 2)) * (3.141593 / 180))) - 320) / ((z% * (1 / 15 * 640)) / 640 + 1)
8  PSET (TX!(x%, z%), TY!(x%, z%)), 16 - (((z% * (1 / 15 * 640)) / 640 + 1) - 1) * 15
9  NEXT z%, x%
10 IF INKEY$ = "" THEN 2
That is REALLY REALLY impressive!!

Weird yet IMPRESSIVE!

Nice @ Megaman, but you forgot a
Code:
(
Gotta luv that Cyrix...

Code:
'"Blurred StarField"
'relsoft.ath.cx

1 IF I& = 0 THEN SCREEN 13 ELSE IF I& < 256 THEN PALETTE I&, 65536 * (I& \ 4) + 256 * (I& \ 4) + (I& \ 4)
2 I& = (I& + 1) AND &H7FFFFFFF
3    FOR K& = 0 TO 255 STEP 1
4        IF I& > 256 THEN CIRCLE (160 + COS(K& - I&) * K&, 100 + SIN(K& - I&) * K&), 1, 255
5    NEXT K&
6 IF I& > 255 THEN J& = (J& + 1) ELSE GOTO 9
7    IF I& > 256 THEN POKE J&, (PEEK(J&) + PEEK(J& - 1) + PEEK(J& + 1) + PEEK(J& - 320) + PEEK(J& + 320)) \ 5 ELSE IF I& = 256 THEN DEF SEG = &HA000
8 IF J& < 64000 THEN 5 ELSE J& = -1
9 IF INKEY$ = "" THEN 1

DEF SEG
no, really, rel, you can stop it!!

i dont know if "starfield" is really the best word for that though *shrug*. i have an idea on how to combine a real starfield and a blur but it's slow.
Please post.... Nice to learn new stuff.

Would that be:

X=I&\320
Y=(I& mod 320)\320

?
:*)

OMG!!! that bouncing blurr is Kewl!!! Fast too!!!!
erm, to convert linear mode 13 coordinates to regular:

x = i& mod 320
y = i& \ 320

and i said i had an idea, which means i'll be tackling this tomorrow Smile
Kewl!!!!!

But i am using this:

I&=(I&+1) amd &H7fffffff

So I need the exta mod. :*)

Would somebody count how many F's are there?

;*)
cool Big Grin 7 f's. but what does it do? ensure you dont reach infinity?
oooops!! Major Gufaw....

Should be MOD 64000 not mod 320

Nahh that's the AND doing what's its supposed to do . *)
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22