Increase the TurnRadius tag. Fighters have a TR of 500, bombers of 1000. If they fly higher than their turn radius they lock up. They are also more likely to abort an attack because of terrain but there's no way to fix that in 76b1, it's fixed in SVN though.smoth wrote:I have my flyers at a higher height BUT when given a larger height aircraft FLY IN CIRCLES.
Make plane flight height static
Moderator: Moderators
Re: Make plane flight height static
Re: Make plane flight height static
Maybe we can prepare another height map which has been *blurred* from the exact height map and then added a certain amount. (some tool may needed to generate the smoothed height map.)
Thus peaks in maps will be hills which increase its altitude gradually, and vice versa.
edit: here the "blur" means:
if altitude map is like this
then after the "blur" procedure the smooth map should be like:
the smoothed value should not be smaller than the original value, but can be bigger. That is a one-way blend. (ie, the "10" in the middle of the sample map above does not decrease but remains 10, but values beside it will increase to 6 or 4 or so.)
the radius of the "blur" procedure can make aircrafts increase or decrease its flight altitude more smoothly and if is set to a good value, the bombers will climb up to the height of a hill when they are still one screen away from the target, and their bombs will not miss.
what's more, this height map can be made when ppl are making their maps and thus Spring doesn't need much calculation in-games.
Thus peaks in maps will be hills which increase its altitude gradually, and vice versa.
edit: here the "blur" means:
if altitude map is like this
Code: Select all
1 1 1 1 1
1 1 1 1 1
1 1 10 1 1
1 1 1 1 1
1 1 1 1 1
Code: Select all
1 1 2 1 1
1 4 6 4 1
2 6 10 6 2
1 4 6 4 1
1 1 2 1 1
the radius of the "blur" procedure can make aircrafts increase or decrease its flight altitude more smoothly and if is set to a good value, the bombers will climb up to the height of a hill when they are still one screen away from the target, and their bombs will not miss.
what's more, this height map can be made when ppl are making their maps and thus Spring doesn't need much calculation in-games.
Re: Make plane flight height static
Except what about the current maps? Unless you have a method of inserting it in all current maps or making it optional, it causes a complete map replacement or will be ignored entirely.
Re: Make plane flight height static
It would be far faster than pathing to do during loading.
Re: Make plane flight height static
IIrc the heightmap is already handled in mipmaps, the only problem is that you need a max()-lowres heightmap (which saves the max value of the quad and not the average). so it is easy to create it and the performance decrease should be small, too. Duno how much the air AI needs to be changed.
- Tribulexrenamed
- Posts: 775
- Joined: 22 Apr 2008, 19:06
Re: Make plane flight height static
This feature was always considered amazing in the game Warzone2100, in which the distance between a VTOL (equivalent of TA planes) and the ground elevation was always constant. The popular "VTOL effect" was always much in demand, in which VTOLs would encounter a very steep height difference on a map, and rapidly rise or fall. Maps with cliffs that produced this effect were very popular, and to be honest, seeing 100 VTOLs rapidly flying up and over a mountain was a very impressive sight. Perhaps in mods where aircraft are mostly slow and designed for ground attack (as in Warzone 2100), an option can be made cruiseAltMode=0 that supports this type of flight, which is extremely CPU friendly. Then, cruiseAltMode=1 would be the equivalent of the current system. For options 2 and maybe 3, planes would take a larger range of height samples ahead of them, and either fly to an altitude calculated with a moving average, in which the maximum height was weighted, or fly over a vertical path consisting of a smoothed height model. I think the former would be more CPU friendly, and efficient. However, the weight on the max height would have to be adjusted to insure no collisions with the map. Fixed altitude aircraft flight seems like a bad idea to me, due to collisions with the maps. Any fixes to this would cause planes to fly at different altitudes in the same mod on different maps, such as a mountainous and flat map.
Re: Make plane flight height static
Fixed altitude aircraft don't have to collide with anything. cruiseAlt=1000; for ex. is really high enough to not collide with mountains in most maps. All that's needed is a second value that controls the min altitude, so for ex. at cruiseAlt=1000 and minAlt=200 the plane will try to go at 1000 units above sea-level ignoring terrain bumps if those are much lower, but will start to follow terrain (current aircraft behaviour) if it has less than 200 units of height difference with the ground (like it's flying over a mountain).
-
- Posts: 1176
- Joined: 23 Aug 2007, 19:46
- Tribulexrenamed
- Posts: 775
- Joined: 22 Apr 2008, 19:06
Re: Make plane flight height static
Good idea yuritch. I still think that multiple modes of dealing with cruisealt should be an option, for different purposes of aircraft.
Re: Make plane flight height static
Krog, blame your ranges and the gravity on your bombs.
-
- Posts: 1176
- Joined: 23 Aug 2007, 19:46
Re: Make plane flight height static
Yeah I know - wanted to point out that just setting the cruise-alts high isn't all you need for a good solution...KDR_11k wrote:Krog, blame your ranges and the gravity on your bombs.

Besides the fixed settings also have the disadvantage of not being map-dependent anymore what some mods might want...
- Tribulexrenamed
- Posts: 775
- Joined: 22 Apr 2008, 19:06
Re: Make plane flight height static
HoneyFox wrote:Maybe we can prepare another height map which has been *blurred* from the exact height map and then added a certain amount. (some tool may needed to generate the smoothed height map.)
Thus peaks in maps will be hills which increase its altitude gradually, and vice versa.
edit: here the "blur" means:
if altitude map is like thisCode: Select all
1 1 1 1 1 1 1 1 1 1 1 1 10 1 1 1 1 1 1 1 1 1 1 1 1
then after the "blur" procedure the smooth map should be like:the smoothed value should not be smaller than the original value, but can be bigger. That is a one-way blend. (ie, the "10" in the middle of the sample map above does not decrease but remains 10, but values beside it will increase to 6 or 4 or so.)Code: Select all
1 1 2 1 1 1 4 6 4 1 2 6 10 6 2 1 4 6 4 1 1 1 2 1 1
the radius of the "blur" procedure can make aircrafts increase or decrease its flight altitude more smoothly and if is set to a good value, the bombers will climb up to the height of a hill when they are still one screen away from the target, and their bombs will not miss.
what's more, this height map can be made when ppl are making their maps and thus Spring doesn't need much calculation in-games.
I hate whatever smoothing function you are using. Your relative maximum has been given far too little weight. It is much better to overestimate altitude, to insure no hill crashes. Try a gaussian filter like I have attached, and perhaps it could be applied at only maxima (and minima) determined by a laplacian approximation mask for better results. It is not a good idea to have this in the map file. The engine should preload this data on startup.
- Attachments
-
- gausmask.gif (2.81 KiB) Viewed 1640 times
Re: Make plane flight height static
Such a blurred height map could also be used to smooth out bumps in the camera when traversing bumpy terrain.
- Tribulexrenamed
- Posts: 775
- Joined: 22 Apr 2008, 19:06
Re: Make plane flight height static
In that case, apply the transform everywhere. Good idea.
Edit: Sorry, I mean the filter.
Edit: Sorry, I mean the filter.
Re: Make plane flight height static
That is what i meanTribulex wrote:I hate whatever smoothing function you are using. Your relative maximum has been given far too little weight. It is much better to overestimate altitude, to insure no hill crashes. Try a gaussian filter like I have attached, and perhaps it could be applied at only maxima (and minima) determined by a laplacian approximation mask for better results. It is not a good idea to have this in the map file. The engine should preload this data on startup.

Re: Make plane flight height static
what ?!?
Re: Make plane flight height static
O_O Yes!AF wrote:Such a blurred height map could also be used to smooth out bumps in the camera when traversing bumpy terrain.
Satirik: The bomber has already dropped its load before it's in range of AA. (The diagram is a bit exaggerated.)
Re: Make plane flight height static
Problem: at what resolution do you generate the smoothed-map? Per mod? Per unit? Do fighters and bombers use the same smoothing? Or do you maintain a set of smoothing lists? Is it time to add movement classes for aircraft?
Re: Make plane flight height static
Just do a simple blur over a couple hundred elmos and it'll work fine. Resolution doesn't really matter, but might as well just use the heightmap resolution.
As for the mod side, have planes specify a float between a static height over map average and the blurred heightmap.
As for the mod side, have planes specify a float between a static height over map average and the blurred heightmap.