Skip to content

Commit

Permalink
(#20) Changed fastjengineconfig example to include target fps/ups
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasstarsz committed Jun 27, 2021
1 parent db24201 commit 8d43e85
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tech.fastj.example.fastjengineconfig;
package tech.fastj.example.engineconfig;

import tech.fastj.engine.FastJEngine;
import tech.fastj.engine.HWAccel;
Expand Down Expand Up @@ -75,6 +75,19 @@ public static void main(String[] args) {
FastJEngine.configureHardwareAcceleration(HWAccel.OpenGL);


/* Lastly, FPS and UPS configuration.
*
* - FPS: Frames Per Second (how many times the game renders to the screen in a second)
* - UPS: Updates Per Second (how many times the game updates in a second)
*
* FPS can be configured with "FastJEngine#setTargetFPS".
* UPS can be configured with "FastJEngine#setTargetUPS".
*
* FPS defaults to the refresh rate of your default monitor -- check your monitor's specifications to determine
* what this value is. On the other hand, UPS defaults to 60. */
FastJEngine.setTargetFPS(60);
FastJEngine.setTargetUPS(30);

FastJEngine.run();
}
}

0 comments on commit 8d43e85

Please sign in to comment.