Air Transports. A Rant. - Page 2

Air Transports. A Rant.

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

User avatar
EXit_W0und
Posts: 164
Joined: 22 Dec 2005, 01:33

Post by EXit_W0und »

I'm not quite sure what you mean there argh, do you mean a maximum size of line a transport will drop units onto?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

No, for auto-pickup- there needs to be some limit that units won't be called towards the transport's center, and a radius at which they automatically are put in the transport, if they qualify. That way, the code can handle various sizes of transport (with the notable caveat that giant transports will probably cause a fair amount of CPU usage, if they have equally-giant "calling distances".
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Air Transports. A Rant.

Post by Argh »

Well, it's all still very, very broken. Darn flight code is what's really making this ugly. I wish I could figure out a way to grab / store units via LUA, then replicate all of this with a modified Bomber :/

Among other issues, attach-unit unitid to 0 - 1, while it does not seem to cause a crash now, does not result in the attached unit disappearing. Kind've hard to have the illusion that my AirTransport is carrying lots of Soldier Shells into battle in PURE, when they're all glommed together in one big bunch under the exact center of my AirTransport... I'm going to get around this with a running script that looks for the state of GET TRANSPORT_ID, then hides / shows the relevant pieces, but that's a lot of extra CPU being wasted, for something that shouldn't have to be done this way, imo...

BTW, I found something that may or may not be a bug, wanted to get people's input:

transportCapacity=12;
transportMass=100000000;
transportSize=12;

Here's what I thought was supposed to be how this worked...

transportCapacity should be the maximum number of Units that can be transported.

transportMass should be the maximum amount of weight allowed, for all Units on board.

transportSize should be the largest x,z allowed.

Instead, so far as I can tell, transportCapacity doesn't seem to do anything. And transportSize... is either using only x or z, and it's linear- i.e., if you have it set to 12, then you can load up to 6 things, size 2, 4 size 3, 2 size 6... this isn't how it should work, imo. It should, instead, be an absolute ceiling- if x or z > transportSize, then the unit should not be able to be loaded. Right now, in PURE, the only way I can keep giant units like UltraAssaults from being transported by the AirTransport, which is supposed to be for small units only, is by specifying that they can't be picked up at all. Am I just making a basic error here, or what? I haven't messed much with this since I released the first public Betas, but DRB brought it up in testing yesterday afternoon, I figured it might be good to see if there's something I can do about this, because I had originally planned to have sea-going transport hovercraft that could move really big units around, so that PURE can have a naval war as well as land and air...
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Air Transports. A Rant.

Post by Forboding Angel »

transport capacity 12 is:

can transport 12 1x1 units
or
can transport 6 2x2
or
4 3x3
or
3 4x4
or
2 5x5
or
2 6x6
or
1 7x7
or
1 8x8
or
1 9x9
or
1 10x10
or
1 11x11
or
1 12x12

Assuming mass is not exceeded

transport size is kinda of a followup for capacity.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Air Transports. A Rant.

Post by Argh »

Yup, that's what my experiments show, too. That's not right- I want up to 6 size 2, zero size 3 or larger, for example... so, why isn't transportCapacity the total size, x, that can be loaded, and transportSize is the max size, x, that can can be loaded as a single transaction? That would make sense...
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Re: Air Transports. A Rant.

Post by yuritch »

Use the mass to limit what a transport can pick. So a transport for light units has enough capacity to get 12 of them and TransportMass=12 x mass_of_1_light_unit, and a heavy unit should weight more than that. Then the transport will not pick it up, no matter the size.
A transport for heavy units will have enough TransportMass to pick up all units that should be transportable (unless you want to limit heavy transport to heavy units only, in which case you probably need to use LUA to somehow disable loading of light units).
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Air Transports. A Rant.

Post by Forboding Angel »

yuritch wrote:Use the mass to limit what a transport can pick. So a transport for light units has enough capacity to get 12 of them and TransportMass=12 x mass_of_1_light_unit, and a heavy unit should weight more than that. Then the transport will not pick it up, no matter the size.
A transport for heavy units will have enough TransportMass to pick up all units that should be transportable (unless you want to limit heavy transport to heavy units only, in which case you probably need to use LUA to somehow disable loading of light units).

THis however presents it's own problems because mass screws with impulse, weapon effects (physical, not visual), and a few other things.

Argh, I'm afraid there is no really good solution.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Air Transports. A Rant.

Post by KDR_11k »

Huh? What weapon effects other than impulse are affected?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Air Transports. A Rant.

Post by Argh »

Mass also can affect Seismic, IIRC. I think there's a way around that, though.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Air Transports. A Rant.

Post by Argh »

Ok, I've found that with a small enough Footprint, I can get rid of the horrible shaking- it's a result of the Transport trying to find a spot to land and failing, every frame, I think :roll:

Darn trees... I wonder if KDR's collision patch will magically fix that one... and allow me an elegant solution.

Flight behaviors are no longer completely borked. It will not accelerate, decelerate in bizarre fashions, nor does it fail to turn. This is probably "good enough", if I can get the landing behavior to work...
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Air Transports. A Rant.

Post by Argh »

Hey, this is cool!

Collide = 0 takes care of the landing problems, so long as the ground is flat. Can solve problems with tree / rubble collisions by just making it blow them up when it lands- elegant, no, but should be effective.

Setting QueryTransport's Piecenum to 0 - 1 works now! Nifty! Ok, so I just need to cure the problems of animation and, then I'm in good shape, other than finally making use of Falling(), etc.!
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Air Transports. A Rant.

Post by Pxtl »

Argh wrote:Hey, this is cool!

Collide = 0 takes care of the landing problems, so long as the ground is flat. Can solve problems with tree / rubble collisions by just making it blow them up when it lands- elegant, no, but should be effective.
What does Collide = 0 actually do? Seen it mentioned a few times.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Air Transports. A Rant.

Post by lurker »

Pxtl wrote:What does Collide = 0 actually do? Seen it mentioned a few times.
Planes won't push other planes, they'll go through.
Post Reply

Return to “Engine”