getFPS says what the system has setFPS to be. It's not a statistic. You need to grab the system time and count when a second changes - then display how many frames have occured over that time.
In your games, to make them step the same amount on different machines over the same period of time use my fineSkip multiplier in the code above.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
I also played with my Nvidia VSync settings and tried different combinations (player and Nvidia VSync settings) - no difference. The output above is with the default VSync settings: "Use the 3D application settings"
@hgy29, I just installed 2018.6.2 The entire player stopped working regardless of the VSYNC option. It just shows a black dot in the middle of the screen. Tried with 4 projects - same thing. Restarted everything - just in case - same thing.
EDIT: I just figured it out. For some reason the zoom in the newly installed player was set to some value close to 0% (it was 100% in the menu). The dot I was seeing was my app running. I checked the zoom back and forth and now all works.
The FPS is 60 regardless of the VSYNC option. On/Off on the player and On/Off in project graphic properties does not make any difference - it is always 60FPS (did not forget to restart the player). Works just fine for me - not sure if something had to change when enabling the VSYNC option. 2018.6.1 was showing 90 FPS regardless of options...
I do think though that if you have set something to update 60 times a second.. then it should reliably update 60 times a second, otherwise what is the point?
In the good old days, it did! NES, SNES, Genesis etc never had any of these issues.
Nowadays there are multiple programs running and also multiple programs rendering, the os has to schedule everything and take all the renderings and render them onto a real screen. All of these things can lead to delays so the timing is slightly off (in some cases way off).
Also some devices go into low power mode after a few seconds if you don't touch the screen (to save battery) - and low power mode often means a lower refresh rate than 60hz. I know my old Samsung S3 used to drop to 40hz when it went to low power mode.
The delta basically lets you know how far off the last frame was from what you requested, so on the current frame you can catch up by adjusting your movement/timing values.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
I think getFps() is a hard coded value, and will just return what setFps() has set. Actual FPS will vary per frame, and as far as I know that's not automatically calculated by Gideros.
@oleg, what language is that? Ukrainian? I speak Bulgarian which is not very close. Let me collaborate: I now get constant 60 FPS (or whatever is set as fps) regardless of VSYNC checkbox. Works just fine for me... I was just saying that now the VSYNC has no effect on my computer.
Vsync option just enable hardware based swapping to avoid tearing effect. In theory at least, since drivers often prefer to do what they want in this respect...
@hgy29, I was just saying that in the prior release I got 90FPS, no matter what is checked and in the latest release I get my 60FPS regardless of settings.
@oleg, I know the guy - he is basically a Russian, born in Bulgaria - was he married to Alla Pugacheva?
Comments
In your games, to make them step the same amount on different machines over the same period of time use my fineSkip multiplier in the code above.
https://deluxepixel.com
Here are the GLFMT debug lines from the player on my PC:
GLFMT:SWAP: 1
GLFMT:STENCIL: 8
GLFMT:DEPTH: 24
GLFMT:BUFFER: QSurfaceFormat::SwapBehavior(DoubleBuffer)
GLFMT:FSWAP: 0x93d4070 0x93d4f80
GLFMT:NSWAP: 1
GL_VERSION:4.5.0 NVIDIA 369.09
GLSL_VERSION:4.50 NVIDIA
I also played with my Nvidia VSync settings and tried different combinations (player and Nvidia VSync settings) - no difference. The output above is with the default VSync settings: "Use the 3D application settings"
The entire player stopped working regardless of the VSYNC option. It just shows a black dot in the middle of the screen. Tried with 4 projects - same thing.
Restarted everything - just in case - same thing.
EDIT:
I just figured it out. For some reason the zoom in the newly installed player was set to some value close to 0% (it was 100% in the menu). The dot I was seeing was my app running. I checked the zoom back and forth and now all works.
The FPS is 60 regardless of the VSYNC option. On/Off on the player and On/Off in project graphic properties does not make any difference - it is always 60FPS (did not forget to restart the player). Works just fine for me - not sure if something had to change when enabling the VSYNC option. 2018.6.1 was showing 90 FPS regardless of options...
Likes: SinisterSoft, totebo
I do think though that if you have set something to update 60 times a second.. then it should reliably update 60 times a second, otherwise what is the point?
Likes: SinisterSoft
Nowadays there are multiple programs running and also multiple programs rendering, the os has to schedule everything and take all the renderings and render them onto a real screen. All of these things can lead to delays so the timing is slightly off (in some cases way off).
Also some devices go into low power mode after a few seconds if you don't touch the screen (to save battery) - and low power mode often means a lower refresh rate than 60hz. I know my old Samsung S3 used to drop to 40hz when it went to low power mode.
The delta basically lets you know how far off the last frame was from what you requested, so on the current frame you can catch up by adjusting your movement/timing values.
Likes: vitalitymobile
https://deluxepixel.com
I think getFps() is a hard coded value, and will just return what setFps() has set. Actual FPS will vary per frame, and as far as I know that's not automatically calculated by Gideros.
Likes: SinisterSoft
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Let me collaborate: I now get constant 60 FPS (or whatever is set as fps) regardless of VSYNC checkbox. Works just fine for me... I was just saying that now the VSYNC has no effect on my computer.
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
@oleg, I know the guy - he is basically a Russian, born in Bulgaria - was he married to Alla Pugacheva?
Likes: antix
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Likes: antix
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!