Open helpmeiguess opened 1 month ago
this is an openfl/lime problem flixel can't really do anything about it
this is an openfl/lime problem flixel can't really do anything about it
^
This issue can also be produced on a standard openfl create
template.
Main.hx:
package;
import openfl.display.Sprite;
class Main extends Sprite
{
public function new()
{
super();
addChild(new openfl.display.FPS());
stage.frameRate = 144;
}
}
Someone wanna raise this up to openfl/lime?
Plz link this issue in there so it connects
Take a basic project. Make an openfl.display.FPS and add it in main. In your Starting state, set FlxG.stage.frameRate to your monitors current hz. In your project.xml, make sure vsync="true" for your target. Compile. The FPS display will be accurate to your actual hz, sometimes with a difference of around 1 or 2. In project.xml, change vsync to false. Compile. The FPS display will be inaccurate.
144 stage.frameRate displays ~168, 60 does 64. Test with whatever numbers you'd like. if you're skeptical, try 90 fps and then try 91. The display from 92 to 102. That's definitely not right.
Observed behavior: Setting fps with vsync results in drastically different frame times than with FlxG.drawFrameRate or FlxG.stage.frameRate
144 hz vsync:![image](https://github.com/HaxeFlixel/flixel/assets/81779430/1477eb15-fa18-4023-a77f-951a74742be3)
frameRate set to 144, no vsync:
Expected behavior:
Fps values maintain consistent and predictable using vsync or in game frameRate.
I don't know how this went unnoticed so long.