Seperate weapons for high/low trajectory

Seperate weapons for high/low trajectory

Requests for features in the spring code.

Moderator: Moderators

User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Seperate weapons for high/low trajectory

Post by Caydr »

(Skip to the bottom for a summary, I got a bit long-winded)

I'm already using a workaround for this problem, but it's a little hacky (no disrespect to Archangel, who designed it). The problem is that, under just the right conditions, they'll fire the low-trajectory weapon when they should be firing high trajectory, or even worse, they fire both.

Although the current high/low trajectory implementation is very nice to have, an improvement might be made by allowing modders to specify different weapon(s) for when a unit is firing high/low trajectory.

For instance, things like plasma batteries (guardian, punisher, etc) become severely overpowered when attacking certain targets, by virtue of their high default impulsefactor and AoE. Yes, I could just reduce thei impulsefactor and AoE and be done with it, but from both a realistic and a gameplay perspective, it doesn't make very much sense. When you fire modern-day artillery high into the air, when it comes down it hits with the additional force of the kinetic energy from the speed it gained on the way down thanks to gravity. For instance, drop a penny from a one-storey house's roof, and it bounces on the ground. Drop it from the top of a skyscraper, and it would not only be lethal, but would probably go several inches or something into pavement.

While plasma in the TA universe doesn't necessarily have the properties of a penny, it's reasonable to believe that the energy released upon impact from a high-velocity, high-altitude shot would be far greater than a direct-fire shot. So. I have two weapons, each activated by the shot being fired in a different range of angles. Direct fire has a small AoE and nill impulsefactor, high trajectory explodes and devastates the entire immediate area, throwing small units into each other and buffeting larger ones. Looks great, but is a little hacky.

If units with high-trajectory could optionally have two weapons specified for each "real weapon", even if this would mean limiting its total weapons to 8 rather than 16, it would result in better gameplay and realism.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

+1 Wanted this ever since hightrajectory was added to the game.
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Post by Gnomre »

Why not evolve the tdf language into something like:

Code: Select all

[Weapon_Name]
{
	asdf;
	[%angle% < 45]
	{
		velocity=
		impulse=
		etc
		[damage]
		{
			asdf;
		}
	}
	[%angle% > 45]
	{
		velocity=
		etc
	}
}
Add a bit of scripting to this stuff and give us more power without having to use up additional weapon slots needlessly (even though it wouldn't matter for 99.999% of units). If you did this you could also seamlessly allow for different models or whatever under certain conditions (say, a Star Destroyer fires at another cruiser. It'd use the Turbolasers at high power, with long reload. But for fighters, it'd use much smaller, low powered, high ROF shots instead). In fact... just convert it *all* into lua and make *all* of this stuff defined in a single file :P
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Re: Seperate weapons for high/low trajectory

Post by Das Bruce »

Caydr wrote:While plasma in the TA universe doesn't necessarily have the properties of a penny, it's reasonable to believe that the energy released upon impact from a high-velocity, high-altitude shot would be far greater than a direct-fire shot.
High trajectory shots fall for rarely more than three seconds, and assuming that x velocity is neglible due to the fact that its initial trajectory is much greater than 45 degrees, the high trajectory round wouldn't be moving faster than 30 metres per second.
User avatar
Dragon45
Posts: 2883
Joined: 16 Aug 2004, 04:36

Post by Dragon45 »

I <3 my Gnomeh!

Suggested several times (i've suggested it myself at least twice); what we are looking for here is essentially an extensible LUA setup of some sort in the scripting language. However it somewhat compelx is the reply I've gotten; I'm relatively familiar with TASpring Scripting Doohickies (its pretty nifty and not overly complex to add bits and pieces etc) but the preoblem comes because integrating LUA to "do stuff" and pass commands to TASpring engine proper is a complete pain in the ass. The engine is very tightly integrated right now; it works closely with scripting bits.

The two must be divorced! Or broken up. Or convinced that they should bcome swingers.


Of course, last time I actually poked with code was months ago, so I may be compeltely wrong now.

But this was my answer at the time :P
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

TDF Parser needs tod erive from an interface clas saka IParser which doesnt exist yet. That way we can have stuff liek the XMLParser class or the LUAconfig class for stuff such as the above..
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Post by Pxtl »

fyi, the penny thing is a myth. They tried it on mythbusters. The penny has too much air-resistance to do that much damage.

And really, we need customized toggles. The devs keep adding toggles for things like immelmans and stuff like that - really, making the toggles customizable per-unit and just changing the way units react to the given toggles seem to make the most sense - I assume you'd like that in GEM where individual weapons could have enable/disable toggles and "high trajectory" is a meaningless concept.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

Ok, then replace "penny" with "ball bearing". Or a lead pellet or something.
User avatar
FireCrack
Posts: 676
Joined: 19 Jul 2005, 09:33

Post by FireCrack »

The shell will have the amse KE on impact no matter if it is fired from a low or high trajectory.....

/physics inquisition
User avatar
ILMTitan
Spring Developer
Posts: 410
Joined: 13 Nov 2004, 08:35

Post by ILMTitan »

Counting air resistance, the hight trajectory shell would have less KE (longer flight time == more E lost).
User avatar
FireCrack
Posts: 676
Joined: 19 Jul 2005, 09:33

Post by FireCrack »

Depending on the parameters that may not necesairly be the case. If the shell is fired above terminal velocity and win a way that it slows to terminal prior to impact the high trajectory shell may have more KE, depending on the specific situation....
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

I don't think that a ball of plasma will rely much on kinetic energy to do damage.
SpikedHelmet
MC: Legacy & Spring 1944 Developer
Posts: 1948
Joined: 21 Sep 2004, 08:25

Post by SpikedHelmet »

The explosive thrust of a cannon firing off a projective is hardly comparable to dropping a penny from your two-story house. Is gravity enough to pull the object towards its center faster than the speed attained by the projectile when first exploded out of the end of the unit's barrel?
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Re: Seperate weapons for high/low trajectory

Post by SwiftSpear »

Caydr wrote: For instance, things like plasma batteries (guardian, punisher, etc) become severely overpowered when attacking certain targets, by virtue of their high default impulsefactor and AoE. Yes, I could just reduce thei impulsefactor and AoE and be done with it, but from both a realistic and a gameplay perspective, it doesn't make very much sense. When you fire modern-day artillery high into the air, when it comes down it hits with the additional force of the kinetic energy from the speed it gained on the way down thanks to gravity. For instance, drop a penny from a one-storey house's roof, and it bounces on the ground. Drop it from the top of a skyscraper, and it would not only be lethal, but would probably go several inches or something into pavement.

While plasma in the TA universe doesn't necessarily have the properties of a penny, it's reasonable to believe that the energy released upon impact from a high-velocity, high-altitude shot would be far greater than a direct-fire shot. So. I have two weapons, each activated by the shot being fired in a different range of angles. Direct fire has a small AoE and nill impulsefactor, high trajectory explodes and devastates the entire immediate area, throwing small units into each other and buffeting larger ones. Looks great, but is a little hacky.
You need to revisit basic newtonian physics. An artillary projectile only loses energy to air resistance the longer it's airborne. If the artillary has enough kinetic energy on firing a projectile to push it a few thousand feet into the air, then it has that kinetic energy weather it fires it at 10% or 80%. A projectile fired several thousand feet into the air will be traveling slower then a projectile fired at low trajec because the longer airtime exposes the projectile to more air resistance and gravity is a null, because it works the same way pulling an opject with momentum moving away from it down as it does with an object moving towards it. 9.8meters per second constant accelleration, this applies to both decelleration and accelleration.
User avatar
Decimator
Posts: 1118
Joined: 24 Jul 2005, 04:15

Post by Decimator »

http://dictionary.reference.com/browse/ ... 20velocity
terminal velocity

n : the constant maximum velocity reached by a body falling through the atmosphere under the attraction of gravity
http://en.wikipedia.org/wiki/Terminal_velocity
User avatar
Erom
Posts: 1115
Joined: 25 Apr 2006, 05:08

Post by Erom »

The crowd is right... KE gained from the fall = KE lost in the rise, plus you lose KE to air resistance so net, a high arc shell will have less energy than a low arc shell.

Fun fact about terminal velocity - an ant can survive an impact on pavement at it's terminal velocity (which is slow) so an ant can survive a theoretically infinite fall, at least in Earth atmosphere/gravity.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Post by Pxtl »

Erom wrote:The crowd is right... KE gained from the fall = KE lost in the rise, plus you lose KE to air resistance so net, a high arc shell will have less energy than a low arc shell.

Fun fact about terminal velocity - an ant can survive an impact on pavement at it's terminal velocity (which is slow) so an ant can survive a theoretically infinite fall, at least in Earth atmosphere/gravity.
Now I want to drop ants from the CN tower to test this.
User avatar
Lindir The Green
Posts: 815
Joined: 04 May 2005, 15:09

Post by Lindir The Green »

Also, ants weigh so little that they have almost no momentum, even when moving very quickly.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

An ant is mroe likely to get blown to a higher altitude by winds
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Post by SwiftSpear »

I used to drop ants off my up stairs balcony and then run down to see that they are still alive. They always were. Lesson learned: ants rock.
Post Reply

Return to “Feature Requests”