pmdg had an option to turn the refresh rate down on some of their planes. And it was to do this very thing of increasing performance
They probably wont touch this, but make it an option, its running on requestAnimationFrame, so every refresh of your monitor, its a brilliant idea to use HTML/CSS to easily draw stuff, its a terrible idea to use it also as the performance is utterly terrible.
I wonder if we can do other tricks like using async methods and transforms of the root elements to move the drawing over to the GPU (assuming its drawing on the CPU - and not just the logic)
Ill have a play later, its also possible to add a getter and setter for the quality property and cache it instead of doing a lookup on every frame. Might also improve it.
It looks like it fully supports ES6, so i guess we have free roam to use most modern JS techniques.
The fact all glass cockpit instruments tends to refresh at your screen’s native refresh rate is absurd in my opinion. I have a 144Hz G-Sync display and the sim never goes over 60-70 anyway.
To keep the instruments smooth without clogging the CPU they should have used another method, based on actually rendered frames.
This HTML/JS framework is showing huge limitations.
Consider Asobo is an independent developer, the game is just distributed by MS.
I partially agree with you. They just tried to keep it as smooth as possible at the cost of performance.
My point was that isn’t a real fix, as it could make the screens very choppy, and people would complain about it.
I guess this is completely down to what monitor you are using, someone using 60hz monitor is probably getting better in cockpit performance than 120+, so for me with 120 4k, its terrible.
I wonder if we can set up the instruments as a web worker on another thread, draw everything in canvas and give the result back, thus freeing up the main thread.
I think everyone would accept a little bit of “choppiness” on their instruments if all the rest gets 10-20 FPS faster. But I agree this is not a fix but just a temporary workaround ![]()
I am sure the developers will tweak everything in future to have smoothness everywhere! ![]()
thank you ![]()
Sure, you are completely right. I will try this one later today, because I don’t care much about the smoothness of the screens if I can have better FPS on specific situations.
I was just saying some people would complain, and they chose to fix it for good, on a more elaborate way.
What’s the refresh rate of your screen, if you don’t mind to answer?
They totally do and it makes totally sense (as a developer)
THANK YOU !!! I can now fly Airliners !!!
Just copy It as it is. The number 3 will divide your Hz by 3 and give you 48Hz. You can play around with that number (2,4,6…) to try other multipliers
144Hz G-Sync
Can you make a video? i’m so confused where to paste what exactly -.-
What you suggest there is exactly what Coherent themselves suggests: not to use requestAnimationFrame because it can result in a ton of reflowing and redrawing.
They say all CSS transforms are fully GPU accelerated, and canvas calls run directly translated right to GPU blits, so using transforms, layering, and canvas should be much more performant than updating, replacing, and manually moving a ton of DOM every frame.
Coherent can be crazy fast for what can be achieved if the right techniques are used.
Found it! Thank you.
It works!!! Many thanks. I did not get so many more FPS, but I don´t have anymore the dreaded FPS plundering when near an Airport in the A320.
Hoping that Asobo can come up with a performance patch soon. The game has so much potential, and certainly some aircraft are better than others, so it´s not a limitation of the rendering engine.
By the way, can I use non-integer numbers to divide? Like 1.5? I have a 60 Hz monitor so I would like to leave the refresh rate of the displays in 40, but 30 seems a bit too low.
I love you bro <3
Go to where he states to go.
Find where the code says;
CanUpdate() {
var quality = this.getQuality();
if (quality == Quality.medium) {
if ((this.frameCount % 8) != 0) {
return false;
}
}
else if (quality == Quality.low) {
if ((this.frameCount % 32) != 0) {
return false;
}
}
else if (quality == Quality.hidden) {
if ((this.frameCount % 128) != 0) {
return false;
}
}
else if (quality == Quality.disabled) {
return false;
}
return true;
}
and overwrite it to his new code:
CanUpdate() {
var quality = this.getQuality();
if (quality == Quality.high) {
if ((this.frameCount % 3) != 0) {
return false;
}
}
if (quality == Quality.medium) {
if ((this.frameCount % 8) != 0) {
return false;
}
}
else if (quality == Quality.low) {
if ((this.frameCount % 32) != 0) {
return false;
}
}
else if (quality == Quality.hidden) {
if ((this.frameCount % 128) != 0) {
return false;
}
}
else if (quality == Quality.disabled) {
return false;
}
return true;
}
All that is changing is that you are adding in these lines:
if (quality == Quality.high) {
if ((this.frameCount % 3) != 0) {
return false;
}
which are setting a refresh rate of the screens when in the cockpit (quality = high) and it’s setting a division of your screen refresh rate (144/3, or 60/3 or 120/3, whatever) and you can change that ‘3’ to be whatever you want. The higher the number, the smaller the end refresh will be and the better performance you should get but the more choppy the little screens will refresh.
No need to be smart there bud. I have been flight simming for 20 years, and honestly, I find it a sad state of affairs that everyone and their dog feels they have the right to put others down because they have a different opinion to your own.
It’s actually nothing to do having with expectations aligned videogame console folk just because someone would like some basic optimization to ridiculously poorly performing jet glass cockpits that were part of a rushed release. We paid a lot of money for the premium deluxe version and have been left with a largely unusable B787 amongst the other jets that perform poorly for the same reasons.
TY, this is what i have found
CanUpdate() {
var quality = this.getQuality();
if (quality == Quality.medium) {
if ((this.frameCount % 8) != 0) {
return false;
}
}
else if (quality == Quality.low) {
if ((this.frameCount % 32) != 0) {
return false;
}
}
else if (quality == Quality.hidden) {
if ((this.frameCount % 128) != 0) {
return false;
}
}
else if (quality == Quality.disabled) {
return false;
}
return true;
I use 165hz monitor tho