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 / Frames Per Second

Author
Message
lcfcfan
21
Years of Service
User Offline
Joined: 19th Feb 2003
Location: North East, UK
Posted: 1st Jun 2003 23:23
Why when i try to get the fps here does it make the screen go wierd, i tried using the cls command but it's no good using that either.

Can someone help me out please?
Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 1st Jun 2003 23:46
put:
SET CURSOR 0,0
before
PRINT screen fps()

or use:
TEXT 0,0,str$(screen fps())
instead of
PRINT screen fps()
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 1st Jun 2003 23:58
The reason is that the print command moves the next print position down one line each time it is used, and when it gets to the bottom, it scrolls the display up one line so that it can print the next line.

Flash's advice is the way around this problem
lcfcfan
21
Years of Service
User Offline
Joined: 19th Feb 2003
Location: North East, UK
Posted: 2nd Jun 2003 00:03
Yeah That works thanx but could you explain to me how it works so i understand it?

i used this piece of code here.

TEXT 0,0,str$(screen fps())

the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 2nd Jun 2003 00:40
screen fps() returns an iteger representing the number of frames per second
str$(value) converts vaiue into a string
text x,y,string prints string on the screen at position x,y

For more details look in the help.
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 2nd Jun 2003 08:05
you would neeed to activate a timer to grab the fps then display so the actual fps checing isnt in the dragging down of fps checks

add a timer to grab the fps check once every second then display it a second later.



Login to post a reply

Server time is: 2024-09-20 09:27:39
Your offset time is: 2024-09-20 09:27:39