If Your Framerate Gets Slower Over Time, It Might Be the Cars

Just a quick tip on tuning X-Plane's rendering performance: if you see your fps start off strong and then drop over time to a crawl, with low GPU, turn down the cars.

Here's the problem: cars are spawned over time.  The way the car engine works is that X-Plane comes up with a budget for cars based on rendering settings, and adds a few more every frame as long as it's under budget; if it is over budget it simply doesn't replace cars that are killed by being too far from your plane or reaching a dead end.

It can easily take several minutes for car traffic to build up.

And the thing about the car traffic is: it's incredibly CPU intensive.  This is something that I am working on and it may get better for future patches, but for now just consider this: a reasonable setting for cars (for your computer) should be based on the framerate after several minutes, not the one you instantly get when there are virtually no cars!

  • Facebook
  • Reddit
  • Twitter
  • LinkedIn

About Ben Supnik

Ben is a software engineer who works on X-Plane; he spends most of his days drinking coffee and swearing at the computer -- sometimes at the same time.
This entry was posted in Development, Hardware. Bookmark the permalink.

8 Responses to If Your Framerate Gets Slower Over Time, It Might Be the Cars

  1. Flightime56 says:

    I'll try that one Ben, I have some interesting data on frame-rates I'm still working through the numbers and I'll let you know the results...but this may be interesting to throw in the mix.

  2. Dominic says:

    Thanks for the tip Ben, will try it out. Regarding frame rates, for me clouds are still the killer even on my late 2011 iMac. If I put everything to minimum except resolution and fly into clouds, it still takes me into single digits, which is the same as when I have most things on medium to high. This is with only 10% clouds.

    Cheers

    Dom

  3. Chris Strosser says:

    I suggest a new cars option between "none" and "Siberian Winter." We can call it "Zombie Apocalypse." 😉

  4. Tom Knudsen says:

    The roads in XP is based on american roads right? This is noticeble in those countries that normally do not have many of these type of roads (i.e. 4 lanes) If using Norway as an example, if one are to reduce the lanes would not the amount of cars be naturally reduced or would it be just more cars seen on i.e 2 lane roads? And further more, will not cars be naturally reduced i.e if one reduces the visibility range?

    I don't know how this code work, but I would love to have an option for using 2, 4, 6 lanes highways.

    PS..
    Siberia Winter works perfect for both realism and FPS

    • Ben Supnik says:

      The traffic density target is a function of both the rendering setting _and_ the capacity of the types of roads (as defined by the artists _and_ the actual roads nearby. So the actual rendering load (unfortunately) depends on where you are. (This is sort of unavoidable - if you are in the mountains there's no way that "downtown LA" can actually make that many cars and still look sane.)

      So if you had a custom road grid that regionally applied to another area, the car budget would change based on how heavily the artist sprinkled cars into _that_ road grid; traffic density is defined per road segment.

      • Tom Knudsen says:

        Do the same function apply to the road texture or do they render globally?

        Then if the code dies/sleeps all other places than where you actually are i.e within the certain amount of nautical miles, would not that ease the FPS?

Comments are closed.