BBG wrote:To be able to set your own FPS cap instead of just having the option of a capped or uncapped FPS with no control over it. Thanks.
A little thing that was mentioned 2 years ago
Moderator: GZDoom Developers
-
- Posts: 7656
- Joined: Sat Aug 07, 2004 5:14 am
- Location: Some cold place
A little thing that was mentioned 2 years ago
I was looking at the general forum when I stumbled on this:
-
- Lead GZDoom+Raze Developer
- Posts: 49188
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Easier said than done. The game still runs with an internal 35 fps and the high frame rate is only achieved by interpolating the movement. The only thing that would make sense is to cap it by vsync rate. That's something I always do anyway because I really don't like the tearing effects of higher frame rates.
But for setting an arbitrary frame rate you have to do some very messy timing to get it all right. You can't just set the game clock and be done.
It really isn't worth the effort.
But for setting an arbitrary frame rate you have to do some very messy timing to get it all right. You can't just set the game clock and be done.
It really isn't worth the effort.
-
- Posts: 2958
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Not really:But for setting an arbitrary frame rate you have to do some very messy timing to get it all right.
Code: Select all
int msec_per_frame = 1000/wanted_frame_rate;
next_msec = current_msec+mesc_per_frame;
gameloop:
while(current_msec < next_msec)
;
next_msec += msec_per_frame;
do_frame();
-
- Lead GZDoom+Raze Developer
- Posts: 49188
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
-
- Posts: 2958
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support