Comentarios
RussiaWohlstand4 years ago

Okay, just now I had to tune the framerate controller and seems it works now as intended. I reviewed the way how the Strangle keeps the framerate, and I made a similar code that does its work. I also had to tune the Windows code because of UNIX-specific nanosleep functionality which on Windows is a pain. I need to let anybody verify the result on Linux and on Windows. Once this build will finish, you can try any of the dev builds: https://github.com/Wohlstand/TheXTech/actions/runs/537340135

P.S. Even the original SMBX built on VB6 will give the same 67 FPS result on Wine.

RussiaWohlstand4 years ago

Anyway, the time "64.1025" is not so proper, so, to get this delay in as-is form, I get the:

  • 1000 / 64.1025 = 15,6000156 milliseconds delay
  • 15,6000156 milliseconds = 15600015,6 nanoseconds On Linux I have the "nanosleep()" call that allows staying this delay approximately and the std::chrono API that allows to getting nanoseconds too. So, the question of what actual inter-frame delay is getting be counted? Or, just round the inter-frame delay into 15.6 milliseconds (15600 microseconds)

P.S. I see some of the code here https://gitlab.com/torkel104/libstrangle/-/blob/master/src/limiter.c, tomorrow I'll try to adapt it and make it do the proper work.

Eliminado
les gusta esto
RussiaWohlstand4 years ago

About the time counter, I made this issue, feel free to post any suggestions/notes/tips: https://github.com/Wohlstand/TheXTech/issues/34

Eliminado
les gusta esto
RussiaWohlstand4 years ago

Hi there! Thanks to Eclipsed and to MECHDRAGON777 who linked me to this discussion, so, gonna answer to given questions:

  • Regarding the accuracy of the framerate, I made this issue: https://github.com/Wohlstand/TheXTech/issues/27 The framerate code in TheXTech right now is equal to the code of SMBX, however, this isn't optimal, and that gives some challenges with it, including the bad work with some levels on slow computers such as my Archos 70c tablet (where I tested my WIP Android build of the game).
  • Do you want me to add the playthrough timer that will count the time since the episode begins? I have two ideas on this: -- add the real-time counter that will watch for the system clock -- add the physics cycles counter that will count time by counting of in-game physics cycles counting every cycle as 1/65 of a second. The note that loading scenes will don't increment this timer as that part doesn't draw anything but loads the stuff at the back. But, it will count the time while staying at the world map and levels.

Right now you can have the same framerate if you will enable the v-sync renderer (will not work on some video cards or when you have no drivers for it), however, the game would work slower if 60 Hz is set up. EDIT: use "-r vsync" to tell the game to use the V-Sync based renderer

Eliminado
les gusta esto
Acerca de Wohlstand
Unido
4 years ago
En línea
1 month ago
Partidas
0
Juegos seguidos
Super Mario Bros. X
Super Mario Bros. X
Última visita 1 year ago
269
visitas