Jump to content

Open Club  ·  12 members

Sign in to follow this  
VonBeerhofen

How do framerates work?

Recommended Posts

It may be a silly question but some people just don't understand the link between AI intelligence and framerates.


Let's start with a simple comparable example, imagine a truck carrying 4000 KG and the same truck carrying 40.000 KG.
When both start off from the same location and drive to the same destiny, which do you think arrives there first?
Ofcourse the lighter truck will arrive first and the difference in arrival time only increase with distance.
It's simmilar with computer framerates, The carried weight can be compared to the graphics a coputer is rendering on screen, the distance is comparable to the power of the graphics card, i.e. the older and less capable the card the longer the road to travel, or better the slower the rendering.

Now here's another comparison, When the EAW gameloop requires a longer time to be carried out, i.e when it is more bytes, the framerate will obviously drop.
The difference was particularly noticable with the 1.x versions of EAW, which is why a fair ammount of people weren't interested in the 1.2 upgrade.
Sure enough they missed out on a few things but the air battles were more ferocious and tougher because of higher FPS as the AI were much quicker to react and as a result more precise in aiming too.

Let's have a quick look at the EXE's I have on my drive,

There's for instance the first 1.28 recompiled version with     1.21MB
Next are the early recompilations of the EXE with         1.22MB
then there's the 1.0 and 1.1 versions which both have         1.30MB
then you have the 1.2 version with                 1.36MB
EAWPRO with 15KB freed memory from v1.2 by optimising the code    1.21MB

The EXE filesizes aren't entirely indicative of the speeds these versions can devellop, after all other processes were activated which also take a bite out of FPS but it gives you a rough idea what to expect.
However most versions allow user control over the graphics by means of the EAW.INI Detail settings.
Addons also can have quite an influence on FPS and what to expect can easily be determined by calculating the modified filesize totals and compare it to the original filesize totals of the stock files.
If the filesize count is lower the game becomes faster, when it's higher the game slows down.


Ofcourse framerate counters are simple tools to easily determine what's happening and when, for instance when a lot of action is going on, explosions, tracers, flack, clouds and groundobjects all visible, birds flying and all detail settings to high (= 2) you will get a reading which will portray the lower end of the FPS spectrum.
When however hardly anything is visible, except perhaps a blue sky and a single bird the reading will display the higher end of the spectrum and you may find a huge difference in the values.

You can ask yourself a question here, is it better to try and maintain overall decent to good FPS throughout, or is it better to have high FPS with hardly anything visible and much lower FPS with a lot going on?
I know where I want to be but do you?

VonBeerhofen  

Share this post


Link to post
Share on other sites

VB

 Pretty sure most folks would like higher frame rates for a smoother flight..I don't require a ton of planes around just enough to fight ..As you have said in the past a lot of guys don't have the latest and I figure they would appreciate anything that makes it smoother...I far from knowledgeable but using FPAPS I see down in the 20's FPS but the flight is smooth as glass and then for no apparent reason it might jump to 50with no change in views or the amount of action..I've a fairly fair setup running in Win 7..I've found in some other sims notably CFS2 and 3 if you hop to an exterior view right away  track your camera around the plane it gets smoother..I think it might load the terrain textures into memory..might be time to revisit my graphic settings and see what changes accomplish and of course turn off the global 2 x AA I rather fly smooth than look good

 

Share this post


Link to post
Share on other sites

Here's a couple of questions:

How do you know for certain that the AI behaves differently depending on frame rate?

Is there a metric to measure such a thing the way FR's are measured or is it purely anecdotal?

 

 

 

Share this post


Link to post
Share on other sites

Well, the easy answer is, because that's what the source code says but I guess that's not a satisfactory answer for you.

Let's look at it from another angle. What do you think causes choppyness in games. Choppyness is a welknown computer phenominum in games which is directly related to framerates. When framerates are low the game jumps several pixels at the time by skipping the pixels in between. This means that your bullet aim also can't cover those pixels, but also that the game will use larger steps for displaying the objects in the EAW world, trying to maintain a reasonable feel of the speed inherent to airplanes flying at 250+ Km/h when updating the EAW world.

Simmilarly, any calculation which tries to predict an enemy's position becomes less accurate when it's extra polating the previous postions where the plane has been. Those temporary stored locations are wider apart because the loop has to wait untill it's that routine's time to execute.

The gameloop attributes a timer to nearly every action in the game, to make sure that inspite of low FPS all the routines get sufficient time to fully execute but also to keep reasobale behaviour between different machines when it's a network game. This timer thus divides the available CPU and GPU power to each routine. It's not hard to imagine that when there is more time for each routine everything will run smoother because each routine can now execute multiple times in the time available to perform the loop, in other words, the entire loop executes more times in real time.

The code also specifies that when the loop executes over 60 times per second a switch will invoke AI to start using human flightmodels. So you see, when the AI routine executes more times, the more often there's time to make decisions and check the situation more often as to the decision to make. Hence they become more dangerous and more precise.

This is true for all games which use artificial intelligence in their design but the used algorythms aren't always the same as there are more ways to skin a cat, but essentially this is how it works in EAW.

Nothing in CPU and GPU power is anecdotal, when one game shows twice the framerate then another game on the same computer, you can expect the same on whatever other computer, no matter what hardware, wrapper or OS is in use. Deviations from this general rule can be attributed to code which is better adapted to use certain versions of DirectX or code could be written to make better use of certain GPU's. The used programming language.is also of influence, C++ is notoriously slow when compared to code written in a macro assembler.

The code I write is getting further away from the C++ compiled code, as the changes are directly written in assembly and not using a compiler to generate code which usually is highly repetitive in it's macros. It's these repetitions I have removed from the code, a programmer may understand that you do not need to specify the same variable and redeclare it when it's value still resides in memory, but that's exacctly what the C++ compiler does. The same variable is often declared 100 times in a single routine where one time is more then enough. When cleaned up in assembly the routine can shrink some 50% without changing what it's doing.

There are programs which can do this too, but they're very expensive. Since they're based on algorythms it may not always do the job properly, only a human being can really understand what the code is doing The solution for optimisation is always different for each individual routine and requires full understanding to get the most out of it. The freed up space is then used to add new code which usually doesn't require much room in assembly language.

VonBeerhofen

Share this post


Link to post
Share on other sites

By anecdotal, I meant can your players confirm that they see a difference in how the AI behaves when frame rates drop.

It would be interesting to read what they have to say.

 

 

Share this post


Link to post
Share on other sites

Current Launchpad members have any aspiration to join any forum, the only member available would be Russ Watson but I doubt wether he has any interest in the subject. His main interest is more directed to playing a stable game of which he can understand the workings, hence he choose EAWPRO.

When you're in doubt of the above facts why don't you ask Sydbod or Brit 44'Aldo, they seemed pretty knowledgable on the subject of computing, any programmer can verify the above and most players will understand how it works. Wether they can measure the difference or not depends on their awareness of their kill ratio going down.

In our online games the kill ratio of all players is permanently visible for all and there's definately been a drop.

VonBeerhofen

Share this post


Link to post
Share on other sites

Hey, I didn't say I was in doubt, I just asked if there's way to really KNOW. It's a healthy debate, that's all.

I'm not saying you are wrong but wouldn't you want to KNOW you are correct?

So, input, whether measured or a group of opinions, would help confirm your claim. I mean, that's what science is all about. Someone presents a theory and then that theory has to survive the resulting questions.

Despite claims from certain quarters, there is no such thing as scientific consensus.

Share this post


Link to post
Share on other sites

I didn't say you're in doubt either but ''when you're in doubt''. Science is not computing or vice versa. Computing is nothing more then playing with a complicated calculator in which 2 + 2 is still 4 but the resulting value can be  interpreted in any way by other calculations when they encounter that specific value, but no matter what you do to the value of the result is always predictable.

I've done a lot of testing with the AI routines when I improved them, when I understand what I'm doing the resulting change will be known even before testing it in the game and I will know what to look for. In C++ things are just as predictable, when the AI routine states that it will check the loop timer untill it reaches a certain value and then carries out the routine, then there's no question that that's what it will do. No science is needed to know, just knowledge about programming.

When players are not aware of what to look for when it comes to AI skill then all I can do is point out what the indicators are and how to test it.  No science is needed for that either, observation is enough. When you can fly around with 16 enemies around you and you need not even look over your shoulder to kill each one, one at the time, or when you're in that same situation and you're getting hammered from all sides then it's pretty clear which AI are the smarter ones.

Let's face it, AI just aren't getting any smarter or more accurate when framerates go down nor will it lead to improvements in the accuracy of human pilots.

VonBeerhofen

Share this post


Link to post
Share on other sites

"I didn't say you're in doubt either but ''when you're in doubt'' " - That is some fine hair splitting.

To be perfectly clear, declaring it isn't science doesn't make it so:

"Science (from the scientia, meaning "knowledge") is a systematic enterprise that builds and organizes knowledge in the form of testable explanations and predictions about the world."

Sums up my position nicely.

 

 

So my question still stands.

How could you quantify your claim?

I don't know the answers but you can't say you do if you're response is "because I say so".

The only way I could envision an acceptable test would be for your players to play a week? month? with as light a graphic load as possible and then play the same period with as heavy a graphic load as their machines can handle. At the end of that time do a survey to ask if they noticed any difference in AI behavior.

It's not a perfect test but it might be illuminating.

Or you could just walk away from this whole conversation and stick to your preconceived, and quite possibly correct, notions.

If it were me, I'd want to know.

Share this post


Link to post
Share on other sites

You or anyone else are welcome to undertake any tests you can think of in order to verify the accuracy of my claims. I've been doing them for around 18 years in on- and offline games and these tests are not likely to stop, since only the best experience is good enough for the Launchpad pilots. Good framerate is very important in our games.

VonBeerhofen

Share this post


Link to post
Share on other sites

Guys, both of you keep this reasonable, Ray, you've asked several times for the demonstration, VonB told you he tried in his installation, let's move this conversation forward please don't make the post stop in the mud.

Thanks.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Similar Content

    • By MarkEAW
      Okay here's the first release of it.
      I forgot to mention in the readme that its hooked for direct input and has a virtual joystick.
      That will allow you to configure the game flight controls to keyboard and cam to mouse.
      (I don't think the virtual Joystick if selected in game will work) Its best to stay with keyboard until you get a physical joystick.
       
      EAWPRO DXWnd Profile
      https://www.mediafire.com/file/sia0o8hby2r44tm/EAWPRO10_(Basic)-DXWnd.zip/file
       
      For this Wrapper Program
      http://sourceforge.net/projects/dxwnd/
       
    • By MarkEAW
      I've used some new and old info to complete this new page on my web site.
      Its a performance record. Of my test of EAW.
      I haven't recorded anything for v1.2 as it does not have a Frames counter, so I'll have to use an nvidia program to give me results overall.
      I have used the un official versions,. I use v1.28 a lot, both GoG(w/wrapper) and without a Wrapper, both in DX3D mode.
       
      Here's most of my tests currently:
      https://eaw.neocities.org/performance.html
       
      Anyhow if your interested in posting your results I'd be glad to see them.
      I'm going to ask them to be for a certain version of EAW and one resolution, as this is best to get everyone's results. (see Help Doc)
       
    • By PJB
      hi guys im playing strike fighters 2 since 11 years but now im facing a strange issue 
      my fps goes up and down in unexpected way when i start the simulator mission some times my fps goes above 60 and some times it goes below 30 and my game lags and slows down 
      i have Dell Latitude E6540 12gb ram 2gb graphic card intel hd 4600 and switchable AMD RADEON HD graphics with 3.0ghz cpu windows 10 and directx 12
       
      this issue never happened before 
      i have played IL-2 sturmovik , falcon bms , lockon flaming cliffs 2 and 3 and strike fighters 2 on this machine very smooth on max settings but now in strike fighters 2 i have fps issues 
       
      any fix or help will be appriciated 
    • By VonBeerhofen
      Thx to Erik and Stratos a special EAWPRO club was erected where further devellopment of my work can take place without unnecessary interruptions. Anyone is welcome to read it's contents which remains uncensored, but discussions are limited to members only and admittance to the club is exclusively under my control. Ofcourse crticism about EAWPRO can still be posted in the General EAW forum and when possible will be taken to heart. I'm sorry that there is no other way to present my work but it will not hamper further devellopment in any way.
      You can find the club through the forum's main page or by selecting CLUBS in the top from any page in the CA forum or by clicking the picture below:
       
    • By VonBeerhofen
      8 hours to unravel it's R/S secrets and 8 more to tweak the model into a light fleet/escort cariier. From here the model can be turned into any carrier class or split up into a multipart model. As a single 3DZ it can be a moving interdiction target (not landable) as well as a static target in harbours or alongside the coast. This is just a start as the model will be turned into a 100% model and It's texture will be upgraded soon.
      VonBeerhofen

      This picture shows the R/S check of a beached carrier with a few additions already :) The model will be added to PTIV as the new EAWPRO exe has freed a slot for an extra ship.

×

Important Information

By using this site, you agree to our Terms of Use, Privacy Policy, and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..