Author Topic: Framerate control  (Read 1821 times)

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1736
    • View Profile
Framerate control
« on: 2017-Jul-03 »
Hi Guys

I am using MrTatoads Framerate timer code on some of my apps for speed control and seems to work more of the time.
Some users have slowdowns etc. but thats probably just their device.

Does anyone use other FPS functions that work well for their apps?


Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4340
    • View Profile
    • FUED
Re: Framerate control
« Reply #1 on: 2017-Jul-03 »
I use Hemlos´ fps routine mostly as a debug feature for me to keep track of things.
Here on this thread he made an upgraded version:
http://www.glbasic.com/forum/index.php?topic=9848.msg85853#msg85853

Offline dreamerman

  • Global Moderator
  • Dr. Type
  • *******
  • Posts: 365
    • View Profile
    • my personal website
Re: Framerate control
« Reply #2 on: 2017-Jul-03 »
I think that LIMITFPS should be sufficient, personally I didn't encounter any problems with it on pc/android (or maybe there are some issues that I'm not aware of?), of course all depends on game loop, as in some mockups I'm just using SLEEP with simple IF delta_time > target_delta THEN draw()
This may vary but it all depends on what devices that issue appears, there are so many fullhd phones with slow gpu that can handle OS quite good but they have problems with displaying all stuff if you are targeting for example 60fps and 100% screen resolution, yet if problem appears on devices with normal gpu's thats real issue.
Check my source code editor for GLBasic - link Update: 20.04.2020

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2687
    • View Profile
Re: Framerate control
« Reply #3 on: 2017-Jul-04 »
Sometimes have problems with windowed mode trying to emulate, say 60hz, when the monitor is 144hz. The only solution is full screen for me.
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1736
    • View Profile
Re: Framerate control
« Reply #4 on: 2017-Jul-05 »
Thanks,

Maybe LIMITFPS is more stable on the newer android versions but earlier on it wasn't working as well as using the FPS with a speed delta multiplier.

Will stick to what I have for now so...will check Hemlos function out too...
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs