Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3] 4   Go Down

Author Topic: NEW turbulence, gusts and wake turbulence for B.A.T.  (Read 3267 times)

0 Members and 1 Guest are viewing this topic.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6010
Re: NEW turbulence, gusts and wake turbulence for B.A.T.
« Reply #24 on: November 07, 2023, 05:17:33 AM »

Update released; see top post (same d/l link as before.)
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

TXZCJSP

  • member
  • Offline Offline
  • Posts: 174
Re: NEW turbulence, gusts and wake turbulence for B.A.T.
« Reply #25 on: November 07, 2023, 06:47:49 AM »

According to you, turbulence and wake turbulence should be disabled in multiplayer.
That way there's no "drift".
If I enable gusts alone, it's converted to turbulence and disabled, right?

It's interesting that unmodified games don't "drift" in multiplayer with gust and turbulence enabled. Is turbulence fixed like gust and not randomized?
Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6010
Re: NEW turbulence, gusts and wake turbulence for B.A.T.
« Reply #26 on: November 07, 2023, 10:58:37 AM »

The gust parameter, if greater than zero AND turbulence is zero, is treated exactly as turbulence. If turbulence by itself is problematic, then gusts by itself will be exactly as problematic.

If turbulence is greater than zero, gusts are always completely ignored.

I'm puzzled as to why my code leads to this drift issue. The fundamentally same vector additions and scaling are used. The only thing I can think of which might be the cause is the fact that over the full range in altitude over which turbulence (and gusts when I did restore that part) operates it is continuously variable in intensity with altitude. By contrast, and if memory is not failing me, the stock implementation has a fixed baseline of intensity over some range of altitude, with hard discontinuities separating these zones.

Indeed, it was a desire for a smoothly varying intensity by altitude which initially drove me to attack this class.

I'm not a 'real' programmer! I'm a hack who knows just enough to get into trouble.  ;)  It would be nice if a real programmer were to look over my Java source...
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

shardana

  • member
  • Offline Offline
  • Posts: 850
Re: NEW turbulence, gusts and wake turbulence for B.A.T.
« Reply #27 on: November 07, 2023, 11:18:55 AM »

How strange, I've installed the mod and modified Conf. as stated but I don't get any effect as supposed. actually I've noticed even if I set strong winds in mission I don't feel any difference in flight. Any clue?  Bat 4.2.2  4
Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6010
Re: NEW turbulence, gusts and wake turbulence for B.A.T.
« Reply #28 on: November 07, 2023, 11:58:17 AM »

Have you toggled the Wind 'n Turbulence difficulty option?
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

TXZCJSP

  • member
  • Offline Offline
  • Posts: 174
Re: NEW turbulence, gusts and wake turbulence for B.A.T.
« Reply #29 on: November 07, 2023, 06:49:33 PM »

I'm leaning more towards the game itself not being able to process the data in time or the efficiency of sending the packets.
Drift has been known to occur in large-scale battles without gusts and turbulence, just not as often or consistently.
With the new feature, the increased computation has exacerbated the problem.

When most of the AI is on patrol, and a few are in combat, there's very little drift.
If there are less than 30 airplanes on the entire map, there is no drift at all, and if there is, it's very rare.
Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6010
Re: NEW turbulence, gusts and wake turbulence for B.A.T.
« Reply #30 on: November 07, 2023, 08:12:05 PM »

As I mentioned previously, the stock Wind.class does not apply turbulence/gusts to AI at all; only the steady underlying wind vector is active.

To correct my prior post, after reviewing the stock gust/turb implementation (again, applicable only for the player and any of his flight underlings) I do see that there is incorporation of variability of intensity with altitude, which I certainly implement. So that aspect would seem to not be a cause of any difference in behaviour.

If it does come down principally to the number of planes, than the density of information leading to inability to transmit it all over a network would seem to be a good candidate for the troubles.

Wake turbulence is a potentially nasty element in these considerations. For each and every plane, a search is conducted among all other planes to see which of them fall inside the distance and height range envelope for calculation of effect. This initial 'weeding out' process scales geometrically as the number of planes. If there are 4 planes active, each checks on the other three, for a total of 12 checks. If there are 16 planes, the number of such checks increases to 240. Were there to be 32 planes, the check count is 992. These are conducted every game tick.

This is the line of code conducting this check, utilizing three conditions, each separated by "&&", meaning that all three must be true before the turbulence is calculated :

if (Math.abs(point3d.z - point3d_AI.z) < 15.0 &&
Math.sqrt((point3d.x - point3d_AI.x) * (point3d.x - point3d_AI.x) + (point3d.y - point3d_AI.y) * (point3d.y - point3d_AI.y)) < 190.0
&& (f1 >= 15F || (f1 < 15F && f_Speed > 20F)))

I wonder if it would be worthwhile to separate out a very basic check condition that would more quickly weed out the obviously inapplicable planes, leaving the other conditions to be run only after this first elimination. Of course, one such quite discriminating condition is whether the plane under examination lies within the +/-15m height envelope of the player. That's a pretty tight constraint. This is the first check conducted, meaning that if that fails the rest of the code is skipped and the next plane is up for testing against. The next check tests whether the plane lies within the maximum distance of 190m within which wake turbulence can be active. The last condition considers planes on or near the ground having a speed of at least 20m/s (about 40kt). I added this last one because strafing a PARKED plane from behind, while skimming just above the ground, should NOT induce wake turbulence!  :D  And then while at it, I considered the application of this turbulence on planes in the process of taking off or landing close together.   ;)
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

TXZCJSP

  • member
  • Offline Offline
  • Posts: 174
Re: NEW turbulence, gusts and wake turbulence for B.A.T.
« Reply #31 on: December 23, 2023, 07:41:31 AM »

A month later I finally found out what was wrong.
The Internet Connection of choice for some players is Moden (56k)
After changing it to Lan, all the "drifting" disappeared!
Could you please add an option for AI to be unaffected by windshear according to UPDATE #1?
Logged

TXZCJSP

  • member
  • Offline Offline
  • Posts: 174
Re: NEW turbulence, gusts and wake turbulence for B.A.T.
« Reply #32 on: December 23, 2023, 07:43:58 AM »

Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6010
Re: NEW turbulence, gusts and wake turbulence for B.A.T.
« Reply #33 on: December 23, 2023, 07:15:37 PM »

A month later I finally found out what was wrong.
The Internet Connection of choice for some players is Moden (56k)
After changing it to Lan, all the "drifting" disappeared!
Could you please add an option for AI to be unaffected by windshear according to UPDATE #1?

I'm glad that your issue was related to network communication and not my code.  ;)

I'm not sure of what you mean by "windshear".

Currently there are 4 separate controls for disabling environmental turbulence and wake turbulence for the player and AI.

What specifically is missing to meet your needs?
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

TXZCJSP

  • member
  • Offline Offline
  • Posts: 174
Re: NEW turbulence, gusts and wake turbulence for B.A.T.
« Reply #34 on: December 23, 2023, 08:42:12 PM »

Actually, it's gusts.  ;D
I've been playing too many flying games and it's messing with my brain a little bit.
I need a gust impact AI switch.
Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6010
Re: NEW turbulence, gusts and wake turbulence for B.A.T.
« Reply #35 on: December 23, 2023, 11:32:51 PM »

I have disabled gust generation. I had done so a long time ago, and recently played around with it some more after having had some small understanding of Java penetrate the ivory.  ;)  But the way gusts have been handled, as a periodic increase added to the mean wind, it has an unsatisfactory manifestation on the aircraft. When flying with or against the wind, the effect was a brief change to wind speed, with no pitch moment or lift component being effected. When flying perpendicular to the wind, the only impact was a deflection in yaw.

For these reasons I felt the gust representation was unsatisfactory and nixed it. The irregular bouncing about from turbulence is sufficiently inclusive of the effect of rough air.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)
Pages: 1 2 [3] 4   Go Up
 

Page created in 0.031 seconds with 25 queries.