Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Show fps without clearing screen in a loop

Author
Message
Mr Bigglesworth
16
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 19th Jun 2009 05:52 Edited at: 19th Jun 2009 07:04
Hey guys, I started up with dbpro again and I am making a small test engine for fun. I want to show the fps, but I have in a loop, and so it won't clog the screen and endlessly make itself I have a cls command so it only shows one instance. The problem with that is it clears off the screen. I would like to see the fps without this "problem", any help would be appreciated.
here is the code


lucifer 1101
15
Years of Service
User Offline
Joined: 26th Jan 2009
Location: Melbourne, Australia
Posted: 19th Jun 2009 06:50
change this



to this



Come and have a look at my hobby site once your ready..
http://darkdstudio.webs.com/
Note: its still really bare..
Mr Bigglesworth
16
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 19th Jun 2009 07:01 Edited at: 19th Jun 2009 07:06
Thanks lucifer 1101, but it just shows 0 for the fps like it wont sync. (or loop for that matter)

bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 19th Jun 2009 08:37 Edited at: 19th Jun 2009 08:40
what you could do is make some 3d obejcts and poitn the camera at them, so you can use set cursor pos 0,0 instead of cls, so you print over the old text. and about the fps=0, thats because you wait 2 seconds. if you would wait 1000, or 500, you would get a higher fps cause i don't think you can get lower than 1. if you want to see, do sleep 500 instead of 1000, you'll see the fps jumps to 1



Mr Bigglesworth
16
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 19th Jun 2009 20:48
Thanks guys, it works great now.

bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 20th Jun 2009 09:28
oh btw, lfbn siad you can also just do turn backdrop on instead of making an object, that works too

Login to post a reply

Server time is: 2024-11-24 05:21:28
Your offset time is: 2024-11-24 05:21:28