You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
Since OpenTyrian's main advantage over original DOS executable is being able to play Tyrian on modern systems, which are ~60Hz over HDMI for the most part, and since OpenTyrian currently targets origina Tyrian farmerate (35FPS, based on a 70Hz display), I believe it would be a good idea to add a 30FPS mode, or even a 60FPS mode, that would fit well on modern displays.
I have been investigating the OpenTyrian sources myself: the SDL_Delay() calls used for framerate control are in src/nortsong.c.
However, this is pretty much obscure to me: float jasondelay = 1000.0f / (1193180.0f / 0x4300);
and also setdelay(), setjasondelay(), setjasondelay2()... seem to use different target, target2, etc.. variables.
So, for experimentation, what could I mangle with to force the game into 30FPS instead of 60FPS?
Additional note:
To get smooth scroll, the SDL_CreateRenderer() call must be like this: main_window_renderer = SDL_CreateRenderer(main_window, -1, SDL_RENDERER_ACCELERATED|SDL_RENDERER_PRESENTVSYNC);
So only framerate adjustment remains! Ideally, the game should sync to video (uncapped framerate) while keeping it's original speed (movement interpolation of some kind... but ~30 FPS should be an improvement over how ugly current scroll looks on modern screens).
The text was updated successfully, but these errors were encountered:
Like many games of its era, the frame rate in Tyrian is tied directly to the gameplay. (Changing the game speed in the in-game menu also changes the frame rate.) Decoupling them would require rearchitecting the whole game, which is unlikely to ever happen.
1000 is 1 second in milliseconds. 1,193,180 Hz is the frequency of the timer available on DOS PCs. 0x4300 is the number of timer cycles per tick in Tyrian.
Hi!
Since OpenTyrian's main advantage over original DOS executable is being able to play Tyrian on modern systems, which are ~60Hz over HDMI for the most part, and since OpenTyrian currently targets origina Tyrian farmerate (35FPS, based on a 70Hz display), I believe it would be a good idea to add a 30FPS mode, or even a 60FPS mode, that would fit well on modern displays.
I have been investigating the OpenTyrian sources myself: the SDL_Delay() calls used for framerate control are in src/nortsong.c.
However, this is pretty much obscure to me:
float jasondelay = 1000.0f / (1193180.0f / 0x4300);
and also setdelay(), setjasondelay(), setjasondelay2()... seem to use different target, target2, etc.. variables.
So, for experimentation, what could I mangle with to force the game into 30FPS instead of 60FPS?
Additional note:
To get smooth scroll, the SDL_CreateRenderer() call must be like this:
main_window_renderer = SDL_CreateRenderer(main_window, -1, SDL_RENDERER_ACCELERATED|SDL_RENDERER_PRESENTVSYNC);
So only framerate adjustment remains! Ideally, the game should sync to video (uncapped framerate) while keeping it's original speed (movement interpolation of some kind... but ~30 FPS should be an improvement over how ugly current scroll looks on modern screens).
The text was updated successfully, but these errors were encountered: