Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Small JS config file mod to gain 10/15+ FPS in airliners and

Featured Replies

  • Replies 53
  • Views 8.3k
  • Created
  • Last Reply

can you pass the solution pls? i can t login to the flight simulator forum


 

Edited by pdgzz

8 minutes ago, pdgzz said:

can you pass the solution pls? i can t login to the flight simulator forum



 

It's referred from this reddit post and you should be able to look at that without signing in. It certainly has some merit to it.

Edited by Evros

  • Author
9 minutes ago, pdgzz said:

can you pass the solution pls? i can t login to the flight simulator forum

imo , wait till u can log-in  and go through the post. i don't want to break anything on your end .....  

 

tldr:

 

CanUpdate() {
        var quality = this.getQuality();
        if (quality == Quality.high) {
            if ((this.frameCount % 3) != 0) {
                return false;
            }
        }    
        if (quality == Quality.medium) {
            if ((this.frameCount % 32 != 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;
    }

Edited by SirDan

i7-8600k @ 3.70 GHz  16.0 GB Ram OS Win 10-64 bit    Geforce GTX 1070 

I've made a backup of the file and made changes, i'll see how it goes considering I fly the A320 a lot. Any gains are welcome.

It looks like what this does is make the sim FPS smoother at the expense of making the 2d glass panels choppier.

This depends on the refresh rate of your monitor, I think for people with 60hz refresh rate monitors (including me), better we go with division of 2 as it will give you 30hz refresh rate for the displays. However, I need to test it shortly and report it back

AMD Ryzen 7 7800X3D, 64GB DDR5 6000MHZ RAM, RX7900XT, FreeSync 165hz 1440p display 

7 minutes ago, ShawnG said:

It looks like what this does is make the sim FPS smoother at the expense of making the 2d glass panels choppier.

Yep, seems like it's only going to update the PFD every third frame.   This would be very easy for folks to tweak to get a balance of performance that works for them. 

It also looks like it's only going to work if the return value of `getQuality` is high, otherwise there will be no effect.   That will need to be updated if folks are running different quality levels (though I don't know without checking myself what quality that's reading)

13 minutes ago, ShawnG said:

It looks like what this does is make the sim FPS smoother at the expense of making the 2d glass panels choppier.

Correct. But there is no reason the 2D panels needed to be refreshing at the monitor refresh rate, so for people with high refresh rate monitors, this is more like balancing out / compromising on the choppiness of the sim and the smoothness of the panels.

The one thing I don't want to compromise with is gauge fps, because during instrument approaches you WANT those gauges to refresh fast enough so that they are very smooth...but if you have a 144htz monitor it might be worth making a small compromise...just be careful not to make the number too high, as that will lower frames on your gauges too much..Im going to try 5 which I think gives me 28.8fps on the gauges.

Edited by hangar

2 minutes ago, FlyingInACessna said:

Correct. But there is no reason the 2D panels needed to be refreshing at the monitor refresh rate, so for people with high refresh rate monitors, this is more like balancing out / compromising on the choppiness of the sim and the smoothness of the panels.

They should have a toggle in game to allow us to control the refresh rate of the panels, so we don't have to mess with the core game files.

i5-12400, RTX 3060 Ti, 32 GB RAM

3 minutes ago, omarsmak30 said:

This depends on the refresh rate of your monitor, I think for people with 60hz refresh rate monitors (including me), better we go with division of 2 as it will give you 30hz refresh rate for the displays. However, I need to test it shortly and report it back

2 minutes ago, hangar said:

Im going to try 5 which I think gives me 28fps on the gauges.

I think that would depend upon what framecount actually represents. 

It's incremented in the afterUpdate() function, which get called on every pass through the main loop (you can see this starting on line 280).    It's not apparent what each pass through the main loop is tied to without digging into the SDK docs.   My hunch is it would be your actual rendered frames, not your refresh rate, so if you were getting, _eg_ 12 fps your screens would update at 4fps even if you're on a 144Hz monitor.

Either way, yeah, it's a fractional control on the rate at which screens update, a bit of experimentation will make it clear what works best for you.  😄

2 minutes ago, kaosfere said:

I think that would depend upon what framecount actually represents. 

It's incremented in the afterUpdate() function, which get called on every pass through the main loop (you can see this starting on line 280).    It's not apparent what each pass through the main loop is tied to without digging into the SDK docs.   My hunch is it would be your actual rendered frames, not your refresh rate, so if you were getting, _eg_ 12 fps your screens would update at 4fps even if you're on a 144Hz monitor.

Either way, yeah, it's a fractional control on the rate at which screens update, a bit of experimentation will make it clear what works best for you.  😄

good point...if this fraction is based off of actual frames then a setting of 5 could mean that at 40fps the gauge refresh rate would be only at 8, lol!

10 minutes ago, abrams_tank said:

They should have a toggle in game to allow us to control the refresh rate of the panels, so we don't have to mess with the core game files.

I agree. I think we’re lucky at this point to even have access to the core sim files though 🙂

21 minutes ago, hangar said:

if this fraction is based off of actual frames then a setting of 5 could mean that at 40fps the gauge refresh rate would be only at 8,

So, after a little more digging, the main loop seems to be a recursive call of requestAnimationFrame which a search through the entire OneStore directory in VSCode doesn't show me being defined anywhere.   Given that these gauges extend HTMLElement, my guess is that this is referring to the requestAnimationFrame call in the standard Web API.   I'm not a web developer, but if that's the case, I'm 99% positive that's tied to the actual *framerate*, not the *refresh rate*.   (You can also find a lot of examples of folks who want to set a constant frame rate but can't achieve that with requestAnimationFrame so they have to do their own clock-time based logic to handle it, which bolsters that assumption.)    So, yeah, you'd probably want to take a first stab at setting that based on your average frame rate in the game, not your monitor's refresh rate.

I could bug one of the web guys at work (I'm a data engineer, so my code is mostly written on the backend) but I think it's easy enough to determine this experimentally.  🙂  

Edited by kaosfere

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.