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.

DarkBASIC Professional Discussion / Frames Per Second questions

Author
Message
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 17th Nov 2010 03:25
hey people, in know it seems like im posting a lot, and here's another one, lol! So to the main point, i know that in a 3d game, if the fps goes down, so does the amount the object moves in one second. I know of dbpro games that constantly monitor fps and adjust the player move amount to keep every thing consistent. Ideally, i need a formula that could convert say, 60 fps into a rotation amount of 1 per frame for example, and an fps of 1 turn into 60 per frame. i have tried dividing with 60, but i get a divide by zero error because the fps starts at zero when any program starts. The other thing i was wondering was how do you keep the fps up without too much graphical sacrifice?

check my youtube channel at http://www.youtube.com/user/freeflightsimulator
WickedX
17
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 17th Nov 2010 03:40
Lee wrote an article about this in one of the news letters. Sorry, I don’t feel like sifting through the back issue. But, that’s were I’d look. Good luck.

Brian

Have netbook will travel.
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 17th Nov 2010 04:25
Haha, thanks!

check my youtube channel at http://www.youtube.com/user/freeflightsimulator
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 17th Nov 2010 09:01
If you're lazy, you can just use this little function I wrote once... Instead of using "sync", you call this function. It was originally designed for DBC, but it should run in DBP :

http://forum.thegamecreators.com/?m=forum_view&t=160974&b=6

TheComet

KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 17th Nov 2010 18:14
Do a forum search for Timer Based Movement. There's a lot to read on the subject.

For a little more advanced loop management, you can check this thread too.
http://forum.thegamecreators.com/?m=forum_view&t=175348&b=6

Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 17th Nov 2010 19:11
@TheComet: Almost a year to the day! lol

My signature is NOT a moderator plaything! Stop changing it!
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 18th Nov 2010 03:06
@thecomet that's a really nice function you wrote and it seems to work fantastically in a fantastically fantastic way But how does it still seem smooth even when the syncrate is set to 1?

check my youtube channel at http://www.youtube.com/user/freeflightsimulator
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 18th Nov 2010 10:46 Edited at: 18th Nov 2010 10:49
Quote: "@thecomet that's a really nice function you wrote and it seems to work fantastically in a fantastically fantastic way But how does it still seem smooth even when the syncrate is set to 1?"


Thanks!

Do you mean you set the actual sync rate to 1, or the comet-sync rate to 1? If you used cometSYNC(1,500), and sync rate 60, then your loop will still run at 60 fps, because the function can't handle negative speed correction. The function is only usefull if the actual sync rate is lower or equal to the comet-sync rate.

TheComet

Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 18th Nov 2010 23:42
I set the cometsync that way, i thought in the other post of yours it said not to use it at the same time you use the regular sync function-but i might not have understood correctly, i'm new to functions:

check my youtube channel at http://www.youtube.com/user/freeflightsimulator
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 20th Nov 2010 19:43
Here's a fully converted function for DBP:



TheComet

Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 20th Nov 2010 20:07
thanks

check my youtube channel at http://www.youtube.com/user/freeflightsimulator

Login to post a reply

Server time is: 2026-07-21 12:51:08
Your offset time is: 2026-07-21 12:51:08