Class FpsDrawListener

  • All Implemented Interfaces:

    public class FpsDrawListener
    extends Object
    implements Runnable
    FPS Draw Listener runs after the canvas has been painted with the buffered image (unused in this plugin) It specifically is designed only to pause when RS decides to paint the canvas, after the canvas has been painted. The RS client operates at 50 cycles happen per second in the RS Client with higher priority than draws per second. For high powered computers, drawing is limited by client cycles, so 50 is the max FPS observed. After running a game cycle and a draw operation, the RS client burns the rest of the time with a nano timer. For low powered computers, the RS client is often throttled by the hardware or OS and draws at 25-30 fps. The nano timer is not used in this scenario. Instead to catch up the RS client runs several cycles before drawing, thus maintaining 50 cycles / second.

    Enforcing FPS in the draw code does not impact the client engine's ability to run including its audio, even when forced to 1 FPS with this plugin.

    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface Runnable