Qbasicnews.com
December 15, 2019, 09:56:11 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 ... 4 5 [6]
  Print  
Author Topic: wormhole  (Read 29049 times)
Mitth'raw'nuruodo
Ancient Guru
****
Posts: 515



WWW
« Reply #75 on: April 20, 2005, 01:15:18 PM »

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...
Logged

i]"But...it was so beautifully done"[/i]
Rattrapmax6
__/--\__
*****
Posts: 2577



WWW
« Reply #76 on: April 20, 2005, 05:28:46 PM »

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:
Logged

Kevin (x.t.r.GRAPHICS)

Antoni Gual
Na_th_an
*****
Posts: 1434



WWW
« Reply #77 on: April 20, 2005, 06:18:05 PM »

So you revived an old thread....
Then you wil have my entry    Smiley

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
Logged

Antoni
Rattrapmax6
__/--\__
*****
Posts: 2577



WWW
« Reply #78 on: April 22, 2005, 06:21:40 PM »

Shocked Thats cool!!!!!
Logged

Kevin (x.t.r.GRAPHICS)

Mitth'raw'nuruodo
Ancient Guru
****
Posts: 515



WWW
« Reply #79 on: April 24, 2005, 12:09:16 PM »

its cool
Logged

i]"But...it was so beautifully done"[/i]
Pages: 1 ... 4 5 [6]
  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!