WIP threads or ideas/ramblings for HeroesQuest competition?

Started by thaaks, June 03, 2008, 07:00:47 AM

Previous topic - Next topic

kevin

Quote from: Draco9898 on July 22, 2008, 11:30:44 PM
Thank you for interest in code frame rate problem, it interesting to see many result

So why haven't you posted your results ?????????????????



Quote
I used to get frame rates like Thaaks, I would try older version of playbasic, but do not have installers for them

  If you don't have an installed version, then how did you install 1.7x in the first place ? 


kevin


    A few points,

    1)  while 1000fps and 500 fps might sound like a huge performance difference,  we're only talking about a 1 millisecond difference.    So if a loop refreshes inside 1 millisecond, you'll get an Fps rate of over a 1000.   I.e to get a 2000fps then the main is exiting at 0.5 milliseconds.   To run at 1000fps then the main loop would be running at 1 millisecond, to run at 666 the main loop takes 1.5 milliseconds,  to run at 500 then it's 2..    333fps=3 milliseconds, 250fps=4 milliseconds ... etc etc..   To run at a 30fps this gives 33 milliseconds per refresh. 

    2) I repeat,  1.7x editions don't support cameras..


   The following is variation of the previous test.   This one profiles the same operations over 5000 frames.  Post results bellow.   Do NOT change anything about the code,  it'll invalidate the result.




OpenScreen 1280,1024,32,2

cls 255
getimage 1,0,0,128,128
cls $ff0000
getimage 2,0,0,128,128
cls $00ff00
getimage 3,0,0,128,128


CreateCamera 1
;Scenedepth
SceneSortMethod 1


repeat

setcursor 0,0
inc frames


// Test Lock
t=timer()
lockbuffer
t1#=t1#+(timer()-t)

Dot 100,100

// Test unlock
t=timer()
unlockbuffer
t2#=t2#+(timer()-t)


t=timer()
lockbuffer
unlockbuffer
text 100,100,"Hidden Text"
lockbuffer
unlockbuffer
t3#=t3#+(timer()-t)

CaptureToScene
CLSScene

Text 10,30,Frames
DrawImage 1,300,300,true
DrawImage 2,400,400,true
DrawImage 3,500,500,true

Afps#=Afps#+fps()

t=timer()
DrawCamera 1
t4#=t4#+(timer()-t)

t=timer()
SYNC
t5#=t5#+(timer()-t)

until Frames=5000

cls 0
Print Frames
Print "      Fps:"+Str$(int(Afps#/Frames))   // Average Fps
Print "     Lock:"+Result(t1#,frames) // lock
Print "   Unlock:"+Result(t2#,frames) // unlock
Print "     Text:"+Result(t3#,frames) // Text from locked state
Print "   Camera:"+Result(t4#,frames) // Camera Refresh
Print "Page Flip:"+Result(t5#,frames) // page flip 

Sync
WaitKey


Function Result(V#,frames)
R$=str$(int(V#/Frames*1000))
EndFunction R$


Draco9898

5000
fps: 111
lock: 1
unlock: 184
text: 709
camera: 6030*
page flipping: 95

playbasic 1.71, machine specs in my sig. The camera is eating the most frames, it seems.

DualCore Intel Core 2 processor @ 2.3 ghz, Geforce 8600 GT (latest forceware drivers), 2 gigs of ram, WIN XP home edition sp2, FireFox 2.

"You'll no doubt be horrified to discover that PlayBasic is a Programming Language." -Kevin

thaaks

5000
fps: 398
lock: 0
unlock: 39
text: 69
camera: 1963
page flipping: 21

playbasic 1.63W10, Athlon Dual Core 4400, 2GB RAM, Win XP SP2, NVidia Geforce 8600GT with standard drivers from manufacturer

[edit] forgot to attach picture. And woohoo - I'm a hero member now  8)

monkeybot


kevin



Green7

@kevin: hello boss, i got a question. ;)

is it necessary to implement the editor into the game, or can it be a standalone programm? i guess it's a dumb question, but if one never asks, he 'll never know... :)
(the same as: if you don't even try to solve a problem, you will never know if you could have solved it...)

kevin

Quoteis it necessary to implement the editor into the game

  Nope.  It's doesn't need to be built into the game. 


  However, including an editor and the src code will certainly increase your chances of winning.   

Green7

I mean, i will entry both, the editor and the game, for sure. but cant they be a standalone prog, or must it be merged into one prog to recieve points?

at this time i got the game and the editor separated...

kevin

  erm....

QuoteIt's doesn't need to be built into the game.


Green7

yes, i've seen it. ;)
but also:

QuoteHowever, including an editor and the src code will certainly increase your chances of winning. 

so is it necessary to include the two components in one prog, or can i enter them as two separate parts, counting for one entry?

kevin


Green7

sorry kev, but english is not my native language. i think you 'd have similar troubles if you should communicate in swiss-german... ;D
but i think i got it now. ;)

Big C.

a simple way to answer...

make your game (= first program)
make your editor (= second program)

put all in one Zip WITH Sourcecode will increase your chance to gain bonus points  ;D ;D ;D ;D