![]() |
|
#1
|
|||
|
|||
![]() Quote:
You could use a simple sine wave function and plot new way points at maximum and minimum amplitude along a line described by the ship's baseline course. If the programmers wanted to get fancy, they could give options for amplitude and frequency to control width of each "curve" and frequency of course changes. This would be realistic for "non-combat" movement by ships in a war zone, where zig-zagging was standard submarine defense. For "emergency" movement against air attack, it would "good enough". If you wanted to move into "pseudo AI" for ships, there are some simple "swarming" or "flocking" algorithms which could be used for basic station-keeping and collision avoidance, as long as ships are assumed to be in a convoy or some other formation and are programmed to keep a certain distance from other ships. These could be used to make a formation of ships all turn in the same direction when under attack. Collision avoidance, especially realistic avoidance of shallow waters, and "intelligent" tactics vs. air attack, would require a lot more effort. Realistic ship movement is way beyond IL2's ability, since it doesn't take factors such as hull draft, turning radius, acceleration, deceleration, heeling angle, waves, wind, etc. into effect when determining ship movement. |
#2
|
|||
|
|||
![]() Quote:
There were different "standard" zig zags. Commodore would use signal flags to order the start, thereafter each ship could work to the clock, knowing what turn was next. On each "leg" they would follow a straight line. |
#3
|
|||
|
|||
![]() Quote:
Obviously, not ideal in terms of absolute realism, and a crock when it comes to giving ships actual AI, but a potentially very simple hack (just 1 line of code for the movement pattern) for a programmer, which would make it slightly more challenging for players to hit moving ships. |
#4
|
|||
|
|||
![]()
This is exactly how ground units turn, and this has a lot of to do with how routes follow straight lines between two pivotal waypoints, no matter if ground or naval units are concerned. What TD could do (if they can do) is to change the code to support bezier curve calculations for waypoints. This would also enable realistically bent roads on maps, what has been long desired by the community.
|
#5
|
|||
|
|||
![]() Quote:
In the FMB, you could automatically have ground vehicles follow roads by using a variation of the "select similar color" function (AKA "Magic Wand" or "color picker") used by graphic design programs. Since on just about every map roads are lighter in color than the surrounding terrain, the "color picker" selects adjacent pixels of "road color" and plots a line based on that info. (For winter maps, the process is reversed and the color picker selects the darker colors.) That, plus a bezier curve tool option would allow "realistic enough" turning. |
#6
|
|||
|
|||
![]() Quote:
Now it works like you go from A to B in a straight line, there you turn for C, and go from B to C in a straight line again. All three waypoints are specified in the mis file. But with A, B, and C we also have all the coordinates for a bezier curve between A and C. All you need is to add the info that B is only a virtual coordinate to be used by the plotting algorithm. Last edited by sniperton; 06-15-2016 at 12:50 PM. |
#7
|
|||
|
|||
![]() Quote:
Quote:
Hopefully, someone from DT is reading this! |
![]() |
|
|