Jump to content
Sign in to follow this  
Guest

Framerates and Speed Optimization in FS2004

Recommended Posts

Guest

Now, I know very little about computer programming. However, I have read posts where people have made comments that part of the framerate issues of FS2002 and prior versions were partially the result of programming sloppiness rather than just the complexity of the program. With FS2004, the designers are adding a "speed optimization phase" which supposedly they had neglicted to some degree on prior versions. I extracted the piece below from the AVSIM FS2004 Preview:Before I get on with some of the specifics we saw, I'll comment on this version's frame rates/smoothness. First, keep in mind that we were seeing Alpha-level code. Even so, the sim's smoothness was impressive, even when flying in Virtual Cockpit mode (as seen on a moderately high-end processor, a 2GHz Dell using nVidia's GeForce 4 ti4600 video card). We were told that this time around the team is placing much more emphasis on code optimization than with previous releases - a speed optimization phase has been added to the development cycle, following the usual code test phase. Yes, there's still work to do to smooth out the more complex panels, but the good news is that there's still half a year to get that done. Now, my questions are 1> How much in your opinion can they hope to improve framerate issues by adding such a speed optimization phase? Maybe another way of looking at this question in relative terms is how much of a difference would it have made in FS2002 when compared to the current state of FS2002? 2> With all of the video card technology we have, why is the computer's CPU still computing the ground objects like it has to do with airport scenery? That is, framerates are great at small airports but poor at more complex airports like ATL and LAX. I would have thought that most of the geometric rendering would be completed by the Video card's VPU like was apparent back in the days of FS98 - when by simply adding a good video card (Voodoo3 3000 for example) would triple framerates across settings. 3> How much of a difference and what kind of differences will we be able to see with the use of DirectX 9 which FS2004 will be able to impliment the features of?I know definitive answers can be made at this time to questions like the above, but more insight for an ignoramus such as myself would be greatly appreciated. I am sure others have asked themselves the same questions when they read the preview that AVSIM so graciously provided. So, a little more insight to one or all of the above questions would be helpful for many folks.Thanks!Robb

Share this post


Link to post
Share on other sites

Some good questions, Robb. I don't have any answers, but this will be an important topic as we get closer to release time. I, for one, wouldn't be upgrading my computer yet- but would rather wait and see what aspects that are peculiar to FS'04 and frame-rates. Some video cards will be better than others, for no logical reason. And whether it's CPU dependant lie prior versions is another question.Bruce.

Share this post


Link to post
Share on other sites
Guest JeanLuc_

Hi Robb,there are no definite answers, but it will certainly, as any optimization process does in any development, do increase the overall performances. As an example, the first "running" True Display XP code was updating the Meridian EHSI Meggitt screen, and only this one, with overall performances plunging FS2002 to 4FPS. After several months of optimization, 10 displays are running concurently in the Meridian with little impact on the FPS (most of the impact being severely reduced in v1.1 of the Meridian). This mostly achieved in proper code rewrite to avoid CPU stall (many of them if not properly coded in C) and better memory management.So designing a feature which work is good, and there is always room for optimization!Hope this helps!

Share this post


Link to post
Share on other sites
Guest

Thanks guys for the response.So in layman's terms, what exactly is optimization as it relates to FS2002/4? When you say code rewrite, do you mean the actual program info like in BASC or whatever they use? Can they write it so that more stuff is dumped off on the Videocard?Robb

Share this post


Link to post
Share on other sites

I think that if FS2002 had been more optimized, we might have got another 50-75% increase in performance, in complex scenery areas (KLAX, addon sceneries etc.). For example, if you were getting 12 FPS now, there's no doubt in my mind that with more optimized code, that system would have gotten close to 20 FPS.FS2004 will add more features, and more bloat, so I don't expect that much of a performance increase over FS2002. However, I don't think FPS will be lower than FS2002, even with the new features.FS2002 is CPU limited because it's not programmed to take advantage of the videocard "GPU" as Nvidia likes to call it. There is a T&L checkbox in the sim but it doesn't seem to do much. FS2002 is largely based on DX7-class features and is a bit primitive in the graphics department. FS has always been a bit behind in taking advantage of new technologies. FS2002 was the first to use multitextured water for animations and reflection effects, as well as detailed, reflective aircraft models. Its cloud rendering is also a bit crude. Mulltitextured water has been used in action games since the Voodoo1 days. I was hoping FS2004 would take advantage of pixel shaders for water effects like those in LOMAC, and windshield effects such as rain and snow, as well as rain and snow on the runway. That would have created some extremely realistic effects, but unfortunately, it looks like we'll have to wait for FS2006 before we get that :(


Asus Prime X370 Pro / Ryzen 7 3800X / 32 GB DDR4 3600 MHz / Gainward Ghost RTX 3060 Ti
MSFS / XP

Share this post


Link to post
Share on other sites
Guest

What will be done is unknown. There is an obvious conflict of interests: The FS team might have their own wishes, but the owner makes his living on people constantly replacing their

Share this post


Link to post
Share on other sites

"So in layman's terms, what exactly is optimization as it relates to FS2002/4? When you say code rewrite, do you mean the actual program info like in BASC or whatever they use? Can they write it so that more stuff is dumped off on the Videocard?"Basically, in programming, there are many ways to achieve the same thing. Can't think of any examples, but compare it to maths. When solving an equations you might have to do it in several steps. If you're good at maths you just look at the equation and solve it in one or two steps :)They'll take the code, look through it and find places where the developers could have used a "smarter" approach to a specific operation or function, and rewrite it.


Asus Prime X370 Pro / Ryzen 7 3800X / 32 GB DDR4 3600 MHz / Gainward Ghost RTX 3060 Ti
MSFS / XP

Share this post


Link to post
Share on other sites

Don't really buy that conspiray theory. Gates gets rich from selling lots of software products. Intel, AMD, Nvidia and ATI get rich from people constantly upgrading so they can run the latest, bloated, unoptimized programs. The software companies want as many people as possible to buy their products, and if the product requires a 3 GHz processor, the target marked won't be very large.


Asus Prime X370 Pro / Ryzen 7 3800X / 32 GB DDR4 3600 MHz / Gainward Ghost RTX 3060 Ti
MSFS / XP

Share this post


Link to post
Share on other sites

It would appear that most software customers are a very uncritical bunch, easily deterred by smokescreens such as return policies, licence agreements etc. If I buy a CD, and it plays only at half speed, i.e. every song low and slow, I'll take it back to the shop and demand a working replacement or my money back - there'd be no questions asked by the staff. So why not do the same with a game that runs as a slideshow on a computer that meets the stated minimum requirements? This product is just as faulty as the CD. If enough people did that, the software companies would either have to specify realistic minimum requirements and risk diminished sales, or optimise the code.Cheers,Gosta.http://hifi.avsim.net/activesky/images/wxrebeta.jpg

Share this post


Link to post
Share on other sites
Guest

Amen to that!It's too bad the PC software industry isn't more like the game console industry. Here's an industry where the hardware isn't upgraded AT ALL for peoriods of 3 to 4 years, yet the games on this same hardware just look better and better. For example, I'm not sure how many of you are into console gaming, but one of my weaknesses is the Final Fantasy series of action/roleplaying games. The first one on the original Sony Playstation, FF7, was the first to use 3D rendering. The models in the movie sequences were blocky and polygonal. Final Fantasy 8, just a couple of years later, looked fantastic, and had very realistic movie sequences. FF9, the last of the FF series to appear on the first gen PS looked even better. Much more colorful and smooth. All on the same hardware, too.Ah well... were it not for the PC games industry, I guess the envelope in PC technology wouldn't be pushed like it is. Who knows, maybe it's the Sim enthusiast of yesterday that helped allow the military to fly unmanned drones in hostile territory today.Cheers!JonKATL

Share this post


Link to post
Share on other sites
Guest christian

1> How much in your opinion can they >hope to improve framerate issues by adding such a speed >optimization phase? Maybe another way of looking at this >question in relative terms is how much of a difference would >it have made in FS2002 when compared to the current state of >FS2002? A lot. Examples: Doom III. Apparently, the rendering code is ready for 1.5 years already. I've seen the Doom III alpha which originates from about that time and it runs fairly slow. John Carmack has spend the last year just opimizing the existing code (probably also playing around with new graphics cards features though, eg openGL2). I expect the game to run a lot better once it comes out (maybe 3-5 times as fast?). IL2: I only played the demo, but given the fantastic graphics and that the game must use a far more complex AI (for the fighter planes), I think it really trashes FS2002 in terms of performance. I would suspect, if the FS team would spend a whole year just on optimizations you could run FS2002 on a Pentium3 500Mhz machine with geforce2 card, all features enabled, and would get about 20-30fps in high detail areas. That might be a bit optimistic though.So why don't they optimize the code that much then? Software development is expensive. A guy like John Carmack spends most of his life just programming. I suspect, the people on the FS team work normal hours, which is fair enough. And probably Microsoft doesn't see it as important to optimize the code to a high degree since they sell enough copies. It all comes down to the question: would they sell enough extra copies to pay the staff for the time spent on all those optimisations? Probably not. What really are optimisations though? It's not just programming better, but mostly it involves approximating complex things. Often, you don't have to solve complex equations, but can do something simple. It may look a bit wrong, but if it's hardly noticable you'll get away with it. Another common approach is to make use of the memory and precompute complex things and store the results for later use. Of course this means that you need more memory though, so programmers usually have to find a good balance between CPU and memory usage...2> With all of the video card technology we have, >why is the computer's CPU still computing the ground objects >like it has to do with airport scenery? Because not everyone owns a Geforce4 / Radeon 9700. About a year ago I still had a TNT card, it's just too expensive for most people to keep up with all the latest and greatest. MSFS has quite a bit of a different target group then the average game. The target group includes many people who also have to feed a family, etc... This wouldn't be much of a problem though if MS would start to incorporate different rendering paths in MSFS (like id software does). If you have a crappy graphics card use the CPU to do all your stuff, if you have the greatest and latest card use the GPU for transformations and texturing. And the remaining space on the CPU could be used for more advanced weather / flight dynamics / AI tasks. I really hope the FS team will go this way eventually, because at the moment I really feel that due to compatibility issues with older cards FS2002 is running with a break on.3> How much of a difference and what kind of differences will we be >able to see with the use of DirectX 9 which FS2004 will be >able to impliment the features of? Nothing too exiting. While the 'directx9' features (not really just directx9 features, opengl can do the same stuff) are really cool, the vast possiblities in effects are really more suited for first person shooters, but not for a flightsim. Speed wise DirectX9 doesn't really make things faster. It expoites modern graphic card features like shaders (which you get on the Radeon 9700 and GeforeFX), but these are more effects that are secondary to flight simming. Those cards can render close to photorealistic scenes in real time, but don't hold your breath, flight simming is different, because the areas that have to be rendered are just so huge.For example, transformations in a flightsim are very basic. Mainly it's just simple translations and rotations. This is accelerated by the Geforce1 already and FS2002 uses hardware acceleration here. But you don't really do many transformation at a time either so a speed gain is barely noticable. If you would design some scenery that would have a lot of dynamic vehicles and buildig parts you would maybe notice a difference. The most recent cards can do complex transformations very fast, that's a difference in DirectX9. However, you have to look hard to find useful complex transformations in a flightsim. Moving water would be something, but you'd need so many vertices if you model the oceans that this would too much for even modern systems. But of course you would only see rippling water around you, so this is a good example of an optimisation. Only let the water ripple around you, but leave distant water as it is. Another example of complex transformations would be crashing planes (actually deforming body), deforming tires during landing, etc. But when it comes down to it, I feel this is all eye candy and there are more crucial parts in FS2002 that need improvement.Same goes with textures. You can do really cool stuff like realistic shadows, reflective and 'bumpmapped' materials, realistic looking skin and hair, reflections + refractions, etc. In the end this is also all eye candy that's not really that crucial for a flight sim. however, all that stuff could possibly be used to make the terrain look much better. This really is something that could be improved significantly still, but this is quite a complex problem, because terrain is just so huge (Directx9 doesn't solve that problem really). In fact that's quite an active research topic that I'm involved in as well.Hope that helps.Cheers, Christian

Share this post


Link to post
Share on other sites
Guest

It seems as if they had a much better balance with FS98 and the CPU/GPU ratio, if there is such a thing... A good videocard with FS98 made all the difference- probably because the scenery was not nearly as complicated... but still!Robb

Share this post


Link to post
Share on other sites
Guest ba747heavy

Quite the informative article Christian! Appreciate the insight.

Share this post


Link to post
Share on other sites
Guest

Interesting Christian -I wonder if the optimization process is anything like laying and waiting for concrete to set. Those who do that sort of work say that 80% of the drying and setting of concrete is completed after the first 24 hours after laying it. However, it takes up to 30 years for it to completely dry and set - the other 20 percent! If they spent a week optimizing the code, would they be able to get most of it done, leaving the rest of the year to hunt down the small details? What do you think? I was led to believe by reading the AVSIM article that the sort of optimization required to increase performance and speed had not been done before, or that they had never set out a time period to do so, a "phase" in their words. "This wouldn't be much of a problem though if MS would start to incorporate different rendering paths in MSFS (like id software does). If you have a crappy graphics card use the CPU to do all your stuff, if you have the greatest and latest card use the GPU for transformations and texturing. And the remaining space on the CPU could be used for more advanced weather / flight dynamics / AI tasks. I really hope the FS team will go this way eventually, because at the moment I really feel that due to compatibility issues with older cards FS2002 is running with a break on."What you said above seemed to have been how FS98 worked out, if you remember right? A good graphics card made all the difference over a poor one. Robb

Share this post


Link to post
Share on other sites
Guest

What would be the benefit of pixel shaders in FS2004, and why do you think developers have not implimented their usage in FS2002/4?Thanks,Robb

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...