Page 1 of 5

Flight behaviour of planes

Posted: 21 May 2005, 12:01
by Rayden
On some maps i noticed that airplanes clip into the terrain or at least draggle over the surface.

In my opinion they should
a) have a better flight AI
b) crash into ground (what would look cool :twisted:)

Posted: 21 May 2005, 14:03
by zwzsg
I disagree about b)

Posted: 21 May 2005, 18:57
by Cheery
I agree! Both! :-)

They should have drag, lift, pull and gravity forces calculated so they would fly like real. Then they would have different performance on different kind of athmospheres. Also they would have different maximum height and optimal height on different maps.

Aeroplanes based on aerodynamic lift couldn't be build on 'space' maps.
Also there could be maps where no aeroplane works.
Also some aeroplanes couldn't fly on too strong wind unlike other aeroplanes could fly better in the stronger wind.
Thought I wonder how the commander has been reached that place and how tanks goes there then... :-)

Then I would like if some of the ambihious planes could hide under the water and work as submarines.

Do you want some equtations? The aerodynamic forces are rather easy and fast to calculate, also we could use some 'toy' values instead of using bernoulli's equtation to calculate it from geometry.

L = Cl * p * V^2 / 2 * A
D = Cd * p * V^2 / 2 * A

Where p is the density of the air,
relative V velocity of the object to the wind,
Cl & Cd lift & drag coefficients,
A the affecting surface.

The drag is different when the object speed is in different angle related into the position, it's also different when there are wind.

Also the angular velocity of the object seems to affect the coefficient. But it may not be so important after all. See why rolling ball causes lift. It can be calculated with some kind of repair value per wind direction thought I gues.

As you can see, the drag and lift are same kind of equtations. So flying is actually only pros and cons in fluid around us.

So we can make a next kind of equtation.
AEF = ( C ) * p * V^2 / 2 * A + (RC.x * R.x, RC.y * R.y, RC.z * R.z )

Where:
- AEF is the aerodynamic force.
- C is the aerodynamic coefficient( y == lift ), ( x & z == drag in different directions )
- p is the density of the air.
- V is the wind velocity.
- A the surface area.
- RC is the rotation coefficient.
- R is the angular velocity.

The C and RC are calculated from geometry precalculations and normalised velocity vector against the wind.

Geometry precalculations can be done with bernoulli's equtations by comparing the pressure effects to the surface, or with invented values. ( which may be better, these >blocks< wouldn't really fly so well ).

This must be done in local space and AEF must be transformed to the global space I believe...

The flight AI may be harder to plan then, and according to that aeroplane -plant, there should be bottom thrusters on every aeroplane.

Posted: 21 May 2005, 19:45
by mongus
i think planes should turn around to gain height.
this can be really tricky ...
the planes should also modify its flighheight (path?) accordingly to the destination.

Posted: 21 May 2005, 20:14
by NOiZE
i don't think making it complicated will make it better..

Posted: 21 May 2005, 20:46
by Cheery
Maybe you are right, it needs simpler equtations. maybe just raw calculation of drag and lift would do the work.

Posted: 21 May 2005, 20:48
by GrOuNd_ZeRo
Aircraft have much more severe problems with targettings, esspecially with guided weapons, Gunships work great however.

Posted: 22 May 2005, 00:53
by BlackLiger
Key note. Sean mirrsen has had me testing for the past 2 days his modified spring code. It has only 3 features away from the normal spring code

1) Water level rises and falls like tides. Its not major, but its neat.
2) Health bars are togleable.
3) Aircraft now crash (take damage) when they hit the ground or water. Its annoying on hilly maps, but cool on normal maps.

Posted: 22 May 2005, 06:52
by Doomweaver
will the code be incorporated into the next release of Spring?

Posted: 22 May 2005, 10:18
by Min3mat
will the aircraft crashing be toggleabible? :twisted: switch it on don't tell your opponent build land troops...watch his air crash and burn :o

Posted: 22 May 2005, 15:49
by Sean Mirrsen
Well, there's quite a bit more features in there, BlackLiger, but these are the mostly noticeable.

What I did for aircraft was making them take damage basd on their speed multiplied by their hitpoints. As such, any aircraft hitting a hillside at close to full speed will undoubtedly crash. I wonder, maybe I should make it rely on other things too? Opinions?

Re: Flight behaviour of planes

Posted: 22 May 2005, 15:59
by PauloMorfeo
Rayden wrote:... airplanes ...
... should
b) crash into ground (what would look cool :twisted:)
Airplanes have much less hit points per metal spent in it's construction that the other units.

This comes for gameplay, so the benefit of they're ability to fly does not make the unit overpowered with as much HP as the other units
but
it also makes sense. If we rip off an «arm» out of rocko or a big chunk of metal out of a stumpy, the unit will still continue to function. However, if we damage half of an airplane's wing, it will crash. It will not stop to function since it's body is not damaged enough (like the rocko and the stumpy) but it is no longer able to fly. So it makes sense that they crash.

It would cause maybe yet another wave of damage (falling into enemie's buildings) but it would also leave them the metal used in it's construction. At the moment, airplanes are very good at that, they never give any metal to your enemy.

So, i wouldn't mind to see airplanes crash! :wink:

Posted: 22 May 2005, 17:46
by Storm
God, do any of you actually play the game?

Planes are totally redundant already because of the radar targetting and the new more inefficient, easy-to-track flight mode. A maverick is thirty times more effective than any plane already and you want the remnants of my planes to crash and burn on random notice?!

Is there not a single person on these forums thinking about the gameplay? Image

Posted: 22 May 2005, 17:49
by Torrasque
I agree with storm...

Posted: 22 May 2005, 19:25
by BeeDee
As long as the planes have good enough maneuvering AI that they don't crash very often, and never during "routine" flight, I think this will be a cute special effect more than a major strategic factor. Though it might make certain tight spots in a map more defensible against air power, which is IMO realistic and interesting.

Posted: 22 May 2005, 20:25
by Storm
True, but at the moment using aircrafts in any other way than scouting is pretty much pointless (well, unless you outproduce your enemies 2 to 1), so in the current game, it would just add another brick on a really heavy veight.

Posted: 22 May 2005, 21:29
by mongus
PauloMorfeo:

You are thinking about a plane that takes some shots, and then "malfunctions" (loose a part of its wing maybe) and crashes into ground, WITHOUT have depleted its life points (HP).

They are talking about planes crashing into hills when they have not enough altitude... or on ground when you are manually flying them..
This depends much on the script they use, and how smart those scrips are.

i.e. in Azure Rampant the planes fatality due to sidehill crash would be VERY high.

Posted: 22 May 2005, 21:36
by Sean Mirrsen
I don't know why it works like that for you, Storm, but whenever I play against myself, even the heaviest defence falls to a good combined scout/fighter/bomber attack. Scouts go in first and take the first volley of flak and missiles, fighters come in second to cause random damage and further disorientate the defences, and bombers do heavy damage while all this chaos is happening. You can still catch attack groups off guard with gunships, perform wicked flank manuevers with fighters, and such.

Btw, why has no one yet thought of a fighter/bomber unit? One would look great in Spring.

Posted: 22 May 2005, 22:34
by Manveru
Oh, I imagine myself sending helicopters (e.g. brawler) to one place and after all every one crashes into the others bc. they can't land. BOOOM

Please keep in mind that 'realism' doesn't mean 'better gameplay'.
In OTA aircrafts hadn't even a collision detection!

But hey, why not take it further:
- Ships crash into land
- Units damage others by colliding
- Land units can fall down hills (rolling!)
- Land units can drown
- Every part of a unit can be destroid and affects the behavior (speed, weapon, ...)

I'm looking forward for other proposals :lol: .

Posted: 23 May 2005, 00:34
by zwzsg
Cheery, do you realise spring is a game? A game, that is supposed to be funny, and that is supposed to handle five hundreds units at once in real time on average computer. So please go away with your fluid dynamics equation. They don't belong in here.

I'm strongly against any form of:
- units randomly losing hp without any enemy around
- units crashing into the terrain
- units crashing into each other

It's not fun to fight against the terrain. It makes the player feel irritated, and it makes him feel his units are totally stupid, and it makes the player wants to stop playing that and plays something else.

It's a game. It's not a simulator. Fun and gameplay are what matters, not pseudo-realism. It's already unfun enough to lose against a player, but that's understandable and bearable, but losing against the terrain, arg please no!!!

Having aircraft try to stay away from each other like they currently do is a very good thing, because it prevents having fifty hawks condense into a single super-hawk like in TA. Having aircraft dies from collision is a stupid idea.

The rampart on my Azure Rampart map are clearly too high and vertical than what the developpers thought maps should be, and so the current spring has a few and very tiny problem with them.

It looks impressive to see a bomber circling far below, over the water and suddendly soaring at 45°, passing over a base dropping his bombs, then diving again behind the wall, but seeing the bomber pass through the wall doesn't look good, and also it seems that such high soar confuse the plane a bit and prevent it to work at maximum efficiency. All that is needed is tiny patching of the plane flight code so they never go through the terrain either make them able to push their nose much more, or make them consider the surrouning height and not just the height on the point they're on, or make them able to jump when they face a cliff, or anything else. Or simply have people realise that maybe maps with tall cliff aren't supposed to be used in spring, and either don't use those map, or accept a few very minor glitch when playing on non-conventionnal maps.