How to stop the clumping of aircrafts?

How to stop the clumping of aircrafts?

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

How to stop the clumping of aircrafts?

Post by knorke »

My aircrafts like to clump into one big ball when they are all send to the same spot.
The aircraft has "starcraft style" air movement, ie it does not do this continous flying like in most spring mods but instead hovers in place when it is idle. That makes the clumping especially noticable. In the mods I looked at, gunships or units with "gunship like" movement ie CT's cruisers do this too.

Is there a way to stop them from doing this?
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: How to stop the clumping of aircrafts?

Post by smoth »

nope :(
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: How to stop the clumping of aircrafts?

Post by knorke »

Image
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: How to stop the clumping of aircrafts?

Post by Beherith »

IIRC turning on collision for aircraft (it used to be on, they just chain blew up anyway from being close) makes them not clump.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: How to stop the clumping of aircrafts?

Post by knorke »

adding
collide = true,
collision = true,
did it! weee!
it looks a bit strange though haha

Hm, next problem:
The aircraft should drop bombs while hovering in position over the target. ie like the China Helix Helicopters in C&C Generals or the Kirov Blimps in Red Alert 2.

When I set
hoverAttack = true,
it does this brawler gunship-style sideways circling of the target, nose pointed to target, and only sometimes gets in range to drop a bomb.
During attack it seems to ignore maxBank
and maxPitch.
With hoverAttack = false, it tries to do these fly-over attacks like bombers and also becomes very unressponsive: takes ages to turn around, somehow flies in very wide circles etc.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: How to stop the clumping of aircrafts?

Post by smoth »

Beherith wrote:IIRC turning on collision for aircraft (it used to be on, they just chain blew up anyway from being close) makes them not clump.
isn't this still MASSIVELY expensive?
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: How to stop the clumping of aircrafts?

Post by Gota »

Making them collide is IMO a bad solution and looks and plays weird.
Try taking the SA fighter movement widget,you'd need to patch it up a bit but it should sove your problem.
What it does it makes all movement commands turn into movement + alt commands thus making all the selected aircraft move and line up in a formation thus not having a chance to clump much.

The only problem is the custom formations widget that allows to draw formations (so you have to click fast and not draw a formation when giving move orders or it wont register as a move command and the units will line up in the formation you drew) which the SA widget is yet to negate.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: How to stop the clumping of aircrafts?

Post by knorke »

apart from faster speeds for aircraft, why should it be that more expensive than collision of ground units?
(in b4 200 fighters on patrol over fusionfarm)

hm i wish aircrafts would not push each other so much :? it looks even sillier than pushing ground units. oh well.

thanks Gota, will look at it.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: How to stop the clumping of aircrafts?

Post by Forboding Angel »

knorke, there is a tag to disallow gunship strafe.
http://springrts.com/wiki/Lua_UnitDefs wrote:UnitDefs[216]["airStrafe"] = true,
THis page is your best friend. Bookmark it.

http://springrts.com/wiki/Lua_UnitDefs

If you want better aircraft behavior, set maxAccel = 0.3,
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: How to stop the clumping of aircrafts?

Post by knorke »

No, this page is my biggest enemy, it does not explain anything or tell what tags work in combination etc.
will try airStrafe, thanks.
Masure
Posts: 581
Joined: 30 Jan 2007, 15:23

Re: How to stop the clumping of aircrafts?

Post by Masure »

Edit it and make it your best friend :-)
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: How to stop the clumping of aircrafts?

Post by Licho »

Beherith wrote:IIRC turning on collision for aircraft (it used to be on, they just chain blew up anyway from being close) makes them not clump.
With current pathing gunships block each other and become stuck if collision is on. See CA.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: How to stop the clumping of aircrafts?

Post by Forboding Angel »

knorke wrote:No, this page is my biggest enemy, it does not explain anything or tell what tags work in combination etc.
will try airStrafe, thanks.
Yes it does. It tells you what all tags are available and shows what that tag's default values are.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: How to stop the clumping of aircrafts?

Post by Pxtl »

Licho wrote:
Beherith wrote:IIRC turning on collision for aircraft (it used to be on, they just chain blew up anyway from being close) makes them not clump.
With current pathing gunships block each other and become stuck if collision is on. See CA.
I could see blocking each other, as they all vye for a clear LOS to shoot the target... but stuck? How so?
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: How to stop the clumping of aircrafts?

Post by Google_Frog »

Forboding Angel wrote:
knorke wrote:No, this page is my biggest enemy, it does not explain anything or tell what tags work in combination etc.
will try airStrafe, thanks.
Yes it does. It tells you what all tags are available and shows what that tag's default values are.
No it shows you the tags that lua can read, some tags there don't exist in unitdefs as they are added while loading units. Other tags in the unitdefs don't show themselves to lua directly. It also does not show the default values
So because the UnitDefs tables are very large, I simple print here an example of it (BA5.8 core commander):
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Re: How to stop the clumping of aircrafts?

Post by FLOZi »

https://github.com/spring/spring/blob/m ... nitDef.cpp

Anyone who doesn't have it bookmarked is doin it seriously wrong.
User avatar
Aether_0001
Posts: 228
Joined: 25 Feb 2008, 03:41

Re: How to stop the clumping of aircrafts?

Post by Aether_0001 »

What I always do when I get aircraft clumping is to use customformations widget and draw a line for them to move to. Alternatively, if your planes are spread out already the way you want them to, you can use ctrl+move, which causes them to end in the same formation they were initially.

Sorry, I'm sure you're asking to a developing question and I'm interpreting this as a gameplay question... if this isn't the answer you want pls ignore or delete.
User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Re: How to stop the clumping of aircrafts?

Post by SanadaUjiosan »

FLOZi wrote:https://github.com/spring/spring/blob/m ... nitDef.cpp

Anyone who doesn't have it bookmarked is doin it seriously wrong.
<~~~ Seriously doing it wrong.

http://springrts.com/wiki/Units:FBI

That's my go-to page for dealing with unit defs. Grossly outdated? Probably. But the explanations are handy. It's gotten me this far.

Will definitely keep that link though Flozi, for future use.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: How to stop the clumping of aircrafts?

Post by knorke »

collide = true,
collision = true,
hoverAttack=true,
airStrafe=false,

kind of does what i wanted :)
Thanks.
I know all the wiki pages btw and they are all equally fail.
You will also notice if you open up any mod, the units have tags that do nothing or do nothing for that unit.
ie there are aircrafts with all the tire tracks tags set and whatnot.
That is because one is basically forced to do trial&error and mindlessly copy stuff over until something works.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: How to stop the clumping of aircrafts?

Post by Forboding Angel »

No, that's just *A being the normal level of fail that is accepted for *A.
Post Reply

Return to “Game Development”