Posts: 442
Threads: 107
Joined: Feb 2005
i guess i said i would decide a winner.. i think all the entry's were great.. but for most visually stunning w/ fewest amount of code its a draw between rel's 9 line entry and Dr_Davenstein's blue warphole thingy... but the person w/ best comments is Rattrapmax6.... so he's the overall winner.. if i had to pick one..
url=http://www.random-seed.net] [/url]
Posts: 503
Threads: 31
Joined: Feb 2005
Ya, well I owned you in Rattra's challenge
Rattra:
No.
png is the second LARGEST in size. But it looks exactly like a bmp sooo its the best.
jpg is the smallest
gif is bigger
^ both suck
i]"But...it was so beautifully done"[/i]
Posts: 2,404
Threads: 153
Joined: Jan 2005
:???: Eh? I thought Rel took it,.. :lol: ,.. what was the score based on??
Um, not in my experements, PNG came out smaller than any jpg I crunched to.. :wink: You do know I'm on Portable Network Graphics right? What part of "Portable" signals biggest?? Have you used any b4? :???:
Kevin ( x.t.r.GRAPHICS)
Posts: 503
Threads: 31
Joined: Feb 2005
:x ok....ummm...then Z!re....ummm....wrong? :o
But anyways did you look back there and see my post? 1 line! I took it baby!!11
i]"But...it was so beautifully done"[/i]
Posts: 961
Threads: 81
Joined: Apr 2005
Quote: Worm hole, under 32, says 32, but you asked for comments, that added to the lines... This is in FreeBasic, hits 6600 FPS on mine, if it goes to fast for you to see it, you might need a minor delay... :wink: But, since it spirals, if it goes faster, it might just look better...
Code: 'Set screen mode to 800*600 RGB
SCREEN 19, 32, 2, 1
'Set the center of the screen..
cntx = 400
cnty = 300
'Set are camera lens..
LENS = 256
'Start timer for frames per second
T! = TIMER
'Main LOOP
DO
r = 40' Radius of worm hole
z = z + 1 'Z cord of worm hole
Rang! = ang * 3.14/180 'Degrees to Radians
x! = r * COS(Rang!) 'Polar to Cartesain X
y! = r * SIN(Rang!) 'Polar to Cartesain Y
Dist = LENZ - z ' Find distance
IF z > 256 THEN ' Check for max Z,..
z = 0 'If true, reduce back to 0
END IF 'End code block
IF z > 0 AND z < 256 THEN 'Make sure z is still on screen
nx! = cntx + (LENS * x! / Dist)'Find new X
ny! = cnty - (LENS * y! / Dist)'Find new Y
ELSE 'So we don't divide by 0
END IF 'End code block
PSET (nx!, ny!), RGB(0, 0, z) 'Place blue pixel
PSET (nx! + 1, ny! - 1), RGB(0, z, 0) 'Place green pixel
ang = (ang + 1) MOD 360 'Add angle, MOD keeps it from going over 360
F = F + 1 'Frame counter
LOOP UNTIL INKEY$ = CHR$(27)' LOOP until Esc is pressed
PRINT "Average FPS:"; F / (TIMER - T!)' Frames per second equation.
SLEEP 'Wait until key is pressed..
I think that's an incorrect count. I got 151,000 FPS. Strange. I didn't analyze the code at all, can't be bothered.
Screwing with your reality since 1998.
Posts: 503
Threads: 31
Joined: Feb 2005
ok. Dude evryone's computer goes at different speeds. It could hit 55000 on yours 6600 on Rattra's and 10203 on mine, it differs for each computer's speed. heh...
i]"But...it was so beautifully done"[/i]
Posts: 2,404
Threads: 153
Joined: Jan 2005
No, it should be right,. I track the start time b4 the loop:
T! = TIMER
Then every loop it counts the loop as one frame:
F = F + 1
On exiting, it takes how many frames it collected, then divides it by how many seconds it was running (which, BTW gives the average :wink: ):
PRINT "Avg. FPS:"; F / (TIMER - T!)
E.I.:
Track start time:
Run proggy:
collect the frames (No. of loops)
End proggy:
No of loops = 1,200,000 frames
Time proggy ran = 60 sec
1000 / 60 = 20,000 fps avg.
Oh, and look at it,. thats just 2 pixel flying around the screen,. so, its flying trust that.. :wink:
Kevin ( x.t.r.GRAPHICS)
Posts: 1,407
Threads: 117
Joined: Dec 2002
So you revived an old thread....
Then you wil have my entry
Code: '-----------------------------------------------------------------------
'GUJERO2.BAS by Antoni Gual 2/2004
'For the QBNZ nine liner contest
'FB compatible. In QB it should be run with FFIX
'-----------------------------------------------------------------------
1 IF i = 0 THEN SCREEN 13 ELSE IF i = 1 THEN OUT &H3C8, 0 ELSE IF i <= 194 THEN OUT &H3C9, INT((i - 2) / 3)
2 IF i <= 194 THEN GOTO 8
3 FOR y! = -100 TO 99
4 FOR x! = -160 TO 159
5 IF x! >= 0 THEN IF y! < 0 THEN alpha! = 1.57079632679# + ATN(x! / (y! + .000001)) ELSE alpha! = -ATN(y! / (x! + .000001)) ELSE IF y! < 0 THEN alpha! = 1.57079632679# + ATN(x! / (y! + .000001)) ELSE alpha! = -1.57079632679# + ATN(x! / (y! + .000001))
6 PSET (x! + 160, y! + 100), (x! * x! + y! * y!) * .00003 * ((INT(-10000! * i + 5.2 * SQR(x! * x! + y! * y!)) AND &H3F) XOR (INT((191 * alpha!) + 10 * i) AND &H3F))
7 NEXT x!, y!
8 i = i + 1
9 IF LEN(INKEY$) = 0 THEN GOTO 1
About FPS count on Rattrapmax6 code, it's correct. It can be so fast because it sets only two pixels per frame...As a comparison my entry updates the whole screen (with poor results) in every frame
Antoni
Posts: 2,404
Threads: 153
Joined: Jan 2005
:o Thats cool!!!!!
Kevin ( x.t.r.GRAPHICS)
Posts: 503
Threads: 31
Joined: Feb 2005
its cool
i]"But...it was so beautifully done"[/i]
|