How do you freaking do it??? - Framerate
Displaying 1-5 of 5 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Bitmonkey

I didn't want to have to post this question, but I can't find the 'Forum Search' bar anywhere! :P I don't think this page is loading quite right for me, but I'm using IE and everything...

How do I keep the framerate inside my game constant? Other than meticulously timing everything with a stopwatch, that is. I want to sync music and voice to various things, so I need to make sure it doesn't change while my back is turned.

Thanks much!

Posted on 2005-02-05 21:36:25

Omni

The searchbar works perfectly under the theme with Department of Retrogaming...forgot the theme name. 'pixel election'.

There are a few different threads here. One of the solutions is to use HookTimer to execute functions every 1/100th of a second that will help keep the game paced.

Framethrottler

Try searching the forums for some posts too. The keywords 'hooktimer' and 'frameskip' are good. Those topics have been mentioned many times before.

Also, I made a demo of a framerate throttler and skipper that doesn't use HookTimer.

Posted on 2005-02-05 22:26:35

RageCage

you don't want to try to synch anything with frame rate, ever. Always synch it with timer. Also, never reset timer, always use timeStamps to zero out the timer when you check it.

Posted on 2005-02-06 13:12:56

TomT64

Rage has a point. Everything should be timer based. Even if you cap the framerate, you still have to override the verge game loop to do so, and it won't run fast on slower computers. If it's timer based, you could run a really smooth game (high frame rate) that always does everything at just the right time.

Posted on 2005-02-07 00:58:39

vecna

Quote:Originally posted by RageCage

you don't want to try to synch anything with frame rate, ever. Always synch it with timer. Also, never reset timer, always use timeStamps to zero out the timer when you check it.


You can zero out timer if you like- since systemtime is read only, I generally use systemtime for timestamp type logic and use timer for less critical things like timing a fade, and I zero it for that sort of thing.

Posted on 2005-02-10 16:59:36


Displaying 1-5 of 5 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.