Special Aircraft Service

Please login or register.

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

Author Topic: Reviewing my new handling of unguided rockets  (Read 402 times)

0 Members and 1 Guest are viewing this topic.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6040
Reviewing my new handling of unguided rockets
« on: April 06, 2024, 12:56:28 PM »

You may recall that I've added much new code for unguided rockets. Last night I refined the handling of the random initial flight path direction at the moment of launch. Here's an overview of all the unguided rocket handling, as it currently stands.


First, note that for each plane the hook orientation for the rockets determines their flight path relative to the plane's own flight path. For many planes this alignment is pretty close to the plane's longitudinal axis during typical flight speeds. For others, like the Wildcat, the aim direction is a bit downward. Additionally, as plane airspeed varies the velocity vector varies with respect to the longitudinal axis. The faster, more the nose pitches down, and hence the more upward the rocket flight path moves upward. My treatment does not do anything different here; a plane's own individual rail/tube orientation remains as before.


Formerly, the stock implementation of "realistic rocket spread" was very simple. For each group of rockets, such as the bunch mounted on rails on one wing, a random amount of aim error was imparted upon spawning of the aircraft. Think of this as the rails having got mounted incorrectly (which I do not like on principle because this treats each group as a solid unit, where all rails of the group move together; this is not necessarily the case.) Each group would receive its own aim offset, and all rockets of that group would fire off in the exact same direction. For instance, the left wing group might fire off low and to the left, and the right wing group might shoot off more or less straight but high. Every firing would end up being completely predictable, which the player could correct for if he remembered the offset to apply after the first missile or two were observed. OK if the rockets are salvo'd individually; if shot in pairs, one would have to correct for one, leaving the other to shoot off in a 'bad' direction. My main complaint was the lack of randomness for each and every individual rocket.

And so I implemented whole new code to deal with rockets. The player has full control via 4 conf.ini controls. Currently, I now bypass the difficulty control, "Realistic rocket spread"; whether enabled or not it has no effect at all. The 4 new controls allow an almost 'infinitely' greater degree control on of rocket spread, thus rendering the horribly simplistic stock scheme moot. Although I am looking at putting that difficulty setting back into use, perhaps as a simple switch to make all rockets shoot dead straight off their rails when selected as off.

1) The now more correct random aim error which replaces the former simplistic approach imparts a fully random aim offset for each and every rocket. While the code applies this as a velocity vector addition in meters/second on each of the 3 axes, for a plane speed of 100m/s (about 200kt) the value the player sets corresponds closely enough to the maximum offset possible in degrees. If, for instance, the value the player sets is 5, the largest flight path offset would be almost one ring diameter for a 100 mil gun sight reticle (5.7 degrees diameter). Most shots are rather less, with only a small percentage being that far off. But the key is now every rocket has an unpredictable initial flight direction. The player can set this from 0 to 15; I find 6 to work nicely.

My change last night involved the application of plane speed at launch as a modifier. The idea being that at faster airspeed the initial aiming will be more accurate. I vary the random flight path offset inversely as the plane's speed; 2X faster results in 1/2 the error. Again, the value set by the player corresponds closely enough to the maximum offset in degrees for a plane speed of 200kt.

2) The old scheme of each group of rails having a random aim error is retained, but again is not currently dependent on the difficulty setting. Formerly a fixed upper limit of 3 (roughly, degrees) was used at all times, which could result in pretty awful offsets for a whole group of rockets. Now the player can set this from 0 to 3, allowing to have a subtler additional source of flight path offsets. Personally, I leave this at 0 when using only unguided rockets; the main individual randomness, combined with oscillation during flight, provides ample unpredictability! ;)  Of course, for guided rockets this source of aim error can be useful.

3) Brand new is the enabling of oscillations in the flight path, to simulate the effects of turbulence, primarily. Again, this is for unguided rockets only. This feature has 2 player controls; one to enable/disable, and the other to set a desired intensity of oscillation. This is applied also as a vector component on the 3 axes, in meters/second. The player can set this from 0 to 30; I find 16 to work well. Perhaps I should combine the two controls, now that I think on it, using an oscillation value of 0 as the 'toggle off' control.


If anyone has any idea on how to implement the difficulty option, "Realistic rocket spread", I'm all ears. Should it be a global control, enabling/disabling ALL rocket features? That is, when this difficulty is set to off, all rockets would fly on the most perfectly true path possible. Or should it apply only to the two sources of initial flight path offset (rail group offset and individual randomness), leaving the turbulent oscillations as their own separate concern for the player to always control (by setting the conf.ini value to 0 in order to turn off)?
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Whiskey_Sierra_972

  • Modder
  • member
  • Offline Offline
  • Posts: 6508
  • In memory of my beloved hero: Saburo SAKAI!
Re: Reviewing my new handling of unguided rockets
« Reply #1 on: April 07, 2024, 02:57:49 AM »

Hi!

Very logic work as always from you!

I think that a conf.ini entry for each should be good....like your flak or distance visibility mode....when effect is disabled it mean a player like a prefect path....like as when real gunnery difficulty is set off...a straight path of bullets and a straight path of rockets....

Maybe you can bind this to that settings: dsabling real gunnery 'll disable also your rocket dispersion....enabling it 'll enable the rocket dispersion....moreover the palyer have a general control by conf.ini values if he like to change your deafult values....
Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6040
Re: Reviewing my new handling of unguided rockets
« Reply #2 on: April 07, 2024, 03:18:11 AM »

Walter,
Before reading your post, I had already earlier today made some changes. When the realistic gunnery difficulty is turned off there is no random aim error introduced. Meaning that all rockets fire in the direction of the rail or tube. (Nor is there any flight path oscillation, for a straight flight other than gravity drop.)

And when the Wind_N_Turbulence difficulty setting is turned off there is no flight path oscillation to suggest a disturbed trajectory in turbulent air.)

Of course, these same results could be achieved by setting the two respective conf.ini controls to zero.

An additional note. When the Wind_N_Turbulence difficulty setting is enabled, one can still have the wind speed set to none, and the turbulence/gusts set to zero, and still have the rocket aim dispersion and oscillating flight path behaviour occurring. In other words, these two aspects of rocket behaviour are not directly tied to any actual wind settings. However, when there is a non-zero wind speed, this is added to the rocket's flight path. Just as it is for bullets and bombs.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)
Pages: [1]   Go Up
 

Page created in 0.029 seconds with 25 queries.