Page 1 of 2

miscellaneous aircraft behaviour fixes and improvements

Posted: 24 Aug 2014, 02:14
by raaar
this is about aircraft behaviour. Currently it has a few issues and stuff we should be able to control but are not, mostly related to movement.


1 --- make possible to set minimal attack distance for unit OR make possible to set primary weapon (for the same purpose)
http://springrts.com/mantis/view.php?id=3900

not directly related to aircraft but could allow gunships to have short range and long range weapons (currently if you use a primary short range heavy weapon + secondary long range wimpy missiles the unit will hover at the range of the longest weapon so the primary weapon won't fire )


2 --- aircraft gunships "snap" instantly to horizontal position when ordered to stop after attacking
http://springrts.com/mantis/view.php?id=4232


3 --- fighter aircraft fly too low and sometimes bump off the ground when engaging targets
http://springrts.com/mantis/view.php?id=4516

- there should be an "attackRunLength" unitdef to set how far fighter aircraft try to keep facing the target to fire non-turret weapons when strafing before trying to restore normal cruise altitude (default 100)

for example, a short length of 50-100 could be used for aircraft that only fire once per run, and a longer length of 300+ could be used for aircraft that fire repeatedly (ex: 2 missile salvos or a long machinegun burst) on the same dive

- there should be an "afterAttackRunLength" unitdef to set how far fighter aircraft should fly after a strafing run (after attackrunlength) before they try to turn to face their target again (default 400)





4 --- add isBomber unitdef to determine aircraft behaviour
http://springrts.com/mantis/view.php?id=4517

currently aircraft with weapons are considered to be "fighters" unless they carry weapons with weapontype AircraftBomb or TorpedoLauncher.

- add "isBomber" unitdef (defaults to False unless the unit contains the previously mentioned types of weapons): if true, aircraft do not try to pitch to face their target and behave like a bomber (they hover horizontally if gunship of fly above it like a bomber).

This is for aircraft that engage targets with weapons on top or belly turrets instead of bombs.

[EDIT: nevermind this one, all that was needed was to use the "upright=1" unit def]


[EDIT]

5 --- abs(airHoverFactor) should affect gunships' sideways movement speed during combat
http://springrts.com/mantis/view.php?id=4518

change airHoverFactor to affect units with airStrafe = true (regardless of whether they and can land or not) when they are engaging targets:

abs(airHoverFactor ) < 1 : strafe sideways slower
abs(airHoverFactor ) = 1 : current behaviour
abs(airHoverFactor ) > 1 : strafe sideways faster


it may be better to add an extra "airStrafeFactor" unitdef instead for that purpose as mod devs may want gunships that barely move when hovering and idle but strafe sideways fast and far when in combat







comments?

Re: miscellaneous aircraft behaviour fixes and improvements

Posted: 24 Aug 2014, 02:30
by Silentwings
(1) Yes, would be nice
(2) Haven't noticed a problem
(3) Haven't noticed a problem (although fast moving aircraft sometimes bump off cliffs, but physics in RTS games is necessarily unrealistic so meh)
(4) No, it's already clear from unitdef what is/isn't a bomber; don't duplicate info

Re: miscellaneous aircraft behaviour fixes and improvements

Posted: 24 Aug 2014, 04:49
by smoth
aircraft should NOT crash into the ground as they fly around. This was NOT always the case. Someone fucked up the aircraft at some point in time

Re: miscellaneous aircraft behaviour fixes and improvements

Posted: 24 Aug 2014, 13:24
by LordMuffe
Silentwings wrote: ...
(4) No, it's already clear from unitdef what is/isn't a bomber; don't duplicate info
does isBomberAirUnit=true actually do what he described? Because if not, that would be a very nice thing to have.

Re: miscellaneous aircraft behaviour fixes and improvements

Posted: 24 Aug 2014, 14:13
by raaar
LordMuffe wrote:
Silentwings wrote: ...
(4) No, it's already clear from unitdef what is/isn't a bomber; don't duplicate info
does isBomberAirUnit=true actually do what he described? Because if not, that would be a very nice thing to have.
there is no such unitdef here.

the point is not finding out if the unit is a bomber within the game, is making it not having to pitch to fire at targets (for aircraft with turrets instead of fixed mount weapons).


added feature 5 to the main post.

Re: miscellaneous aircraft behaviour fixes and improvements

Posted: 24 Aug 2014, 14:26
by Silentwings
there is no such unitdef here.
You can easily work it out from there - hence "don't duplicate info".

Re: miscellaneous aircraft behaviour fixes and improvements

Posted: 24 Aug 2014, 14:33
by FLOZi
Dev standpoint is 'no more unit/feature/weapon def tags'

Re: miscellaneous aircraft behaviour fixes and improvements

Posted: 24 Aug 2014, 16:20
by LordMuffe
so how would i get my "airplane" with turrets to pass over its target, like a bomber would, instead of acting like a fighter and dive head first towards it? When i tried to make a unit like that a few years back, it did´t work at all.

Would be nice, if one could simply use a unitdeftag to switch it on/off instead linking it to a weapon type.

Re: miscellaneous aircraft behaviour fixes and improvements

Posted: 24 Aug 2014, 19:27
by raaar
LordMuffe wrote:so how would i get my "airplane" with turrets to pass over its target, like a bomber would, instead of acting like a fighter and dive head first towards it? When i tried to make a unit like that a few years back, it did´t work at all.

Would be nice, if one could simply use a unitdeftag to switch it on/off instead linking it to a weapon type.
yes, but there's a workaround i didn't know:
- gunships can use the "upright=1" unitdef
- non-gunships can use a fake bomb weapon (this still sucks though)

Re: miscellaneous aircraft behaviour fixes and improvements

Posted: 24 Aug 2014, 19:39
by LordMuffe
raaar wrote: - non-gunships can use a fake bomb weapon (this still sucks though)
didn´t work for me when i tried it, but i´m sub-par when it comes to coding

Re: miscellaneous aircraft behaviour fixes and improvements

Posted: 24 Aug 2014, 19:47
by smoth
I don't want a new tag just fix the aircraft trajectory shit so they don't fly into the target any more! Shit is retarded

Re: miscellaneous aircraft behaviour fixes and improvements

Posted: 26 Aug 2014, 02:13
by raaar
smoth wrote:I don't want a new tag just fix the aircraft trajectory shit so they don't fly into the target any more! Shit is retarded
technically, (1), (2), (3), and (5) can be solved without new tags.

on issue (4), having to use a fake weapon to get a relatively common behaviour does seem like something that could use an extra tag.

Re: miscellaneous aircraft behaviour fixes and improvements

Posted: 26 Aug 2014, 05:42
by smoth
4) is fine if they would fix the bomber behavior. As in stands it went from fines to tragically broken.

Re: miscellaneous aircraft behaviour fixes and improvements

Posted: 26 Aug 2014, 18:51
by Jools
FLOZi wrote:Dev standpoint is 'no more unit/feature/weapon def tags'
Then maybe that standpoint may need to be discussed

Re: miscellaneous aircraft behaviour fixes and improvements

Posted: 26 Aug 2014, 19:04
by FLOZi
Jools wrote:
FLOZi wrote:Dev standpoint is 'no more unit/feature/weapon def tags'
Then maybe that standpoint may need to be discussed
I was mistaken - it isn't a universal standpoint.

Re: miscellaneous aircraft behaviour fixes and improvements

Posted: 27 Aug 2014, 05:43
by Google_Frog
I get the feeling that parts of this thread are no longer relevant. http://springrts.com/mantis/view.php?id=4516#c13576

Re: miscellaneous aircraft behaviour fixes and improvements

Posted: 27 Aug 2014, 07:02
by smoth
Maybe. Honestly, I won't be able to look into it until next week some time. There is a good chance I'll be off in the desert for a good few days after tomorrow.

Re: miscellaneous aircraft behaviour fixes and improvements

Posted: 28 Aug 2014, 01:31
by raaar
Google_Frog wrote:I get the feeling that parts of this thread are no longer relevant. http://springrts.com/mantis/view.php?id=4516#c13576
I just tested it again on spring_{develop}97.0.1-206-g8576ee8_minimal-portable and issue (3) is still happening.

http://springrts.com/mantis/view.php?id=4516#c13577

added screenshot.

Re: miscellaneous aircraft behaviour fixes and improvements

Posted: 28 Aug 2014, 16:39
by Jools
raaar wrote:this is about aircraft behaviour. Currently it has a few issues and stuff we should be able to control but are not, mostly related to movement.

- there should be an "afterAttackRunLength" unitdef to set how far fighter aircraft should fly after a strafing run (after attackrunlength) before they try to turn to face their target again (default 400)[/size]
This would be quite handy. Currently at least xta is bugged by the fact that most aircraft stop too soon after engaging their targets, or if target disappears.

I know this is somehow related to brakerate tag, but adjusting brakerate tag also affects acceleration of aircraft and is therefore not desirable -- will make aircraft hard to manouvre. At least I like to again hand agile scouts at least. It is not clear to me how you can increase the brake distance of a craft while still keeping it agile.

The above suggestion would fill that need.

Re: miscellaneous aircraft behaviour fixes and improvements

Posted: 28 Aug 2014, 16:40
by Jools
FLOZi wrote:
Jools wrote:
FLOZi wrote:Dev standpoint is 'no more unit/feature/weapon def tags'
Then maybe that standpoint may need to be discussed
I was mistaken - it isn't a universal standpoint.
I apologise for my brusque statement above. It was not mean't to be formulated that way.