Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik

IL-2 Sturmovik The famous combat flight simulator.

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 08-25-2013, 01:38 AM
Igo kyu's Avatar
Igo kyu Igo kyu is offline
Approved Member
 
Join Date: Sep 2008
Posts: 703
Default

Quote:
Originally Posted by ElAurens View Post
OK, let's stop speaking about the AI as if they are beings. OK?

The AI is the computer program that runs the sim. It doesn't have to "calculate" anything. It already "knows" evey parameter of your aircraft's performance, and it knows how you have set your gun convergence. It "knows" where you are at all times, it knows when you make a control input, and has a perfect solution for hitting you at all times.

All that the settings can do is either slow this process down or limit the range that it picks you up as a target.
That is more or less correct in my opinion, but you don't have to mess with the AI at all. What you have to do is make any round fired not along the exact bore of the gun, but an random point in a circle around that boresight. This is called a circular area of probability, usually it's given as the radius that 50% of the shots fall within, but as a simplification in a sim one could plausibly use a circle within which 99% of the shots would naturally fall and make all of the shots occur at random points within that. Then the AI could be as accurate as they like, but they wouldn't be pulling off 100% headshot kills at 750 metres, because there would be a random element in there, which would counter their unnatural non-randomness and make the whole game a lot fairer overall. It wouldn't affect the scores of humans, because we're not accurate enough to get headshot kills by other than random chance anyway.
  #2  
Old 08-25-2013, 04:52 AM
MaxGunz MaxGunz is offline
Approved Member
 
Join Date: Apr 2011
Posts: 471
Default

Or you could simply round off the aiming angle values (3D takes 2 angles) to say 0 decimal places for a rookie, 1 place for the next level, 2 for the next and so on. If the shot is close, even a rookie won't miss though the rookie may not hit the exact aiming point.

I passed that one on to Oleg well before 4.07, btw.
  #3  
Old 08-25-2013, 09:21 AM
majorfailure majorfailure is offline
Approved Member
 
Join Date: Jan 2013
Posts: 320
Default

Quote:
Originally Posted by MaxGunz View Post
Or you could simply round off the aiming angle values (3D takes 2 angles) to say 0 decimal places for a rookie, 1 place for the next level, 2 for the next and so on. If the shot is close, even a rookie won't miss though the rookie may not hit the exact aiming point.

I passed that one on to Oleg well before 4.07, btw.
Your idea is not practicable.
Two situations, AI gunner, Rookie, correct firing solution is a)47.935° and b)47.000° . For a) and b) Rookie shoots to 47.0, and for b) he hits dead on. All of the times -whenever accidentally your plane gets to a firing soultion that is or is close to and higher than an integer number, a rookie will hit.

Last edited by majorfailure; 08-25-2013 at 09:23 AM.
  #4  
Old 08-25-2013, 10:00 AM
MaxGunz MaxGunz is offline
Approved Member
 
Join Date: Apr 2011
Posts: 471
Default

At 200m, 1/2 degree missed by 1.75m, about 5' 9".

Not far enough? The calculations are in radians anyway. 1 radian is a bit over 57 degrees so in the math even a rookie would get a couple-three places and be missing.

I mention doing it this way because it calculates quicker than figuring actual degree to miss by, requires less changes to the existing code and once in a while even a rookie gets lucky.

But what do I know? I only paid my rent and bills by writing/developing code for many years in many languages. I've done a good bit of shooting too, including with automatic weapons though not from a moving plane. They are still so much easier to hit targets with than single-shots it's funny, especially at ranges I wouldn't even try single-shots.

That algorithm can adjust for conditions too, like when the plane the gunner is in is turning, though IMO under some conditions it should be impossible to shoot and one the plane is going down the gunner should be bailing out, not sniping. masking a few bits in an IEEE floating point number takes only a few cycles, especially when the mask is in a pre-set variable.

What can I say? I learned to code on old, slow, 8-bit micros without FPU's and still make the programs seem fast. I do know what I'm writing about.
  #5  
Old 08-25-2013, 11:21 AM
Pursuivant Pursuivant is offline
Approved Member
 
Join Date: May 2010
Posts: 1,439
Default

Quote:
Originally Posted by Igo kyu View Post
What you have to do is make any round fired not along the exact bore of the gun, but an random point in a circle around that boresight.
+1. This is exactly the mechanism needed. Various factors that Horseback, myself and others have mentioned just increase the size of the circle.

Quote:
Originally Posted by MaxGunz View Post
Or you could simply round off the aiming angle values (3D takes 2 angles) to say 0 decimal places for a rookie, 1 place for the next level, 2 for the next and so on. If the shot is close, even a rookie won't miss though the rookie may not hit the exact aiming point.
And this is a potentially quite good way of differentiating between skill levels, although I'm not sure that the difference between "Rookie," "Average," "Veteran," and "Ace" skill is actual orders of magnitude. Even so, it's an elegant solution.
  #6  
Old 08-25-2013, 05:17 PM
majorfailure majorfailure is offline
Approved Member
 
Join Date: Jan 2013
Posts: 320
Default

I think I didn't quite get my point to the both of you, so I'll try again:
I think that simply rounding off the aiming angles will not give the desired results -it will make rookies as accurate as ace when the plane they are aiming at is near an angle that is integer or slightly above.

Say correct firing solution is 1.040rad, target distance is so that 0.01rad off is miss.
Rookie will shoot to 1rad, and miss. Average will shoot to 1rad, miss.
Ace and veteran to 1.04rad and hit.

Next time, target is at 1.000rad, thus rounding the solution will give a hit for all.

So the result is that rookies get accuracy spikes when the angle that represents the correct firing solution is close to an integer. And on the other hand, when I approach at 0.5 rad I can get as close as I want toward a rookie gunner and he can't touch me.
  #7  
Old 08-25-2013, 11:24 PM
MaxGunz MaxGunz is offline
Approved Member
 
Join Date: Apr 2011
Posts: 471
Default

I'm not suggesting to round to 57 degrees. I'm suggesting to mask some low bits, rounding to a small error that means you will get hit ==less often than in-game Nowwwww at long range==.

I am NOT suggesting to replace the system we have Nowwww with something else.

From what you write, I don't think that you have much of a grasp on geometry let alone trig.

1/2 degree off at 200m misses by 1.75 meters. Do you think that you in a virtual moving plane can maintain that angle to the virtual gunner in the virtual moving target?

I count on bigger positional changes over seconds within the game.

No, it's not random. It's not IRL. Neither is uniform distribution of shots. But guess what methods require more or less CPU load and memory to implement?

You play with your ideas but IL2 is not a game of crawling up on fixed positions where you can know the possible fixed lines of fire a defense can make. Get close enough and the shot that would go between your eyes will hit you anyway.
  #8  
Old 08-26-2013, 08:04 AM
Pursuivant Pursuivant is offline
Approved Member
 
Join Date: May 2010
Posts: 1,439
Default

Quote:
Originally Posted by majorfailure View Post
So the result is that rookies get accuracy spikes when the angle that represents the correct firing solution is close to an integer. And on the other hand, when I approach at 0.5 rad I can get as close as I want toward a rookie gunner and he can't touch me.
Potentially valid points, but there are ways to overcome the problem. For example, modeling turbulence and propwash effects on an aircraft, or airframe or gun vibration will constantly introduce a bit of randomness into even an otherwise static firing solution.

Additionally, how often do you get a firing situation that never changes with respect to the target?

I think that MaxGunz's solution plus a simple random number generator would work fine for most situations.

I'd love to find more data on how WW2 flexible guns actually worked, however. It's almost inevitable that the USAAF and USN did a lot of work on gunner accuracy, and the RAF probably did some, too. Perhaps all those old technical reports are moldering is archives somewhere.
  #9  
Old 08-26-2013, 12:17 PM
MaxGunz MaxGunz is offline
Approved Member
 
Join Date: Apr 2011
Posts: 471
Default

Could just use a number of bitmasks and cycle through them. Mask logic, like shift operations, eats far fewer cycles than integer or floating-point math.
  #10  
Old 08-26-2013, 05:41 PM
majorfailure majorfailure is offline
Approved Member
 
Join Date: Jan 2013
Posts: 320
Default

Quote:
Originally Posted by MaxGunz View Post
Could just use a number of bitmasks and cycle through them. Mask logic, like shift operations, eats far fewer cycles than integer or floating-point math.
Now I have to agree, given the mask cycle is long enough to generate near random results.

And it could resolve the rookie 1000times as accurate than ace. Just mask/shift the same decimal positions and use different max deviation limits, e.g. an ace mask allows for 0F as max deviation, while the newbie mask allows for say 4F max.
Closed Thread


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:06 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.