Two different and parallel weapons shooting effect

Two different and parallel weapons shooting effect

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

Moderator: Moderators

Post Reply
User avatar
lgustavomp
Posts: 27
Joined: 18 Mar 2007, 14:13

Two different and parallel weapons shooting effect

Post by lgustavomp »

Hey, whasup? I've being played and 'studied' SupCom and Spring due to their modding power. So i found ONE thing in SupCom that is more 'elegant' than is Spring. And that is the AIMING. The attached img below says by itself.

When you have two weapons firing instantainly and 'parallely', the bullets converges to the target center in Spring. But in SupCom they're fired parallely, like shoud be.

My question is: there's a way to avoid this effect? Something like happens with SupCom?

Like i drew the example, would be very nice shoot homming missiles with this kind of aiming.

Image

Thx :wink:
Saktoth
Zero-K Developer
Posts: 2665
Joined: 28 Nov 2006, 13:22

Post by Saktoth »

In the case of cannons, lasers, or whatever, i believe its to do with the script. In BA for example, the arm HLT behaves as you describe. In XTA however, i believe it behaves in the method you prefer- since it aims from the centre of the turret rather than switching the aiming point depending on the barrel it is shooting from.

In the case of missiles, KDR has made some patches which will make what you describe possible- although this is already currently the behaviour on air units.

Ive also got it to behave that way in a mod im working on, for non-air units, surprisingly. Must be a quirk in the script! Ill check it out.
YokoZar
Posts: 883
Joined: 15 Jul 2007, 22:02

Post by YokoZar »

Saktoth wrote:In the case of cannons, lasers, or whatever, i believe its to do with the script. In BA for example, the arm HLT behaves as you describe. In XTA however, i believe it behaves in the method you prefer- since it aims from the centre of the turret rather than switching the aiming point depending on the barrel it is shooting from.
Hypothetically, if you took the XTA style turret and aimed it at a really tiny unit, would it always miss?
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Post by SwiftSpear »

YokoZar wrote:
Saktoth wrote:In the case of cannons, lasers, or whatever, i believe its to do with the script. In BA for example, the arm HLT behaves as you describe. In XTA however, i believe it behaves in the method you prefer- since it aims from the centre of the turret rather than switching the aiming point depending on the barrel it is shooting from.
Hypothetically, if you took the XTA style turret and aimed it at a really tiny unit, would it always miss?
No, spring units have a minimum size.
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Post by Gnomre »

For projectile weapons, it depends on their velocity. High velocity projectiles can easily cruise straight through a very small unit in less than the rate the engine checks for collisions.

(I haven't played any recent versions of XTA, so I have no idea if they use beamlasers or TA-style projectile lasers, so I'm not responding directly to that, just in general)
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

All lasers will currently converge. I could have changed that but I figured that would be too gamebreaking since the AimFromWeapon pieces are set wrong for this on most units, making it way too likely that the shot would miss. You could emit-sfx the shot, then it's parallel but there's a good chance it'll miss because the turret isn't lined up perfectly.
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post by Guessmyname »

The missiles thing should be possible using KDR's 'macross missile' code
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

The XTA HLT doesnt fire both weapons at once. If a unit was too small it would rotate fire then rotate back so it would still hit the target, whereas the BA version would continue to defy common sense and look wierd and wierder as the unit got closer.
Saktoth
Zero-K Developer
Posts: 2665
Joined: 28 Nov 2006, 13:22

Post by Saktoth »

Just checked it out on the XTA turret and it does indeed converge, oh well.

Either way, since there are no weapons im aware of that fire two shots from two barrels at once (other than the janus and its guided), its not that bad- the turret just re-aims itself every time it wants to fire from a different barrel so, other than the jeerkiness of the barrel twisting around every other shot that this can cause, its not so weird.

If you wanted to specifically script a weapon that fired from two barrels at once, im sure you could do it in the above fashion.

A turret done in this way would be more likely to miss though, if the barrels are placed further apart than the size of the targets hitsphere.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

SwiftSpear wrote:
YokoZar wrote:
Saktoth wrote:In the case of cannons, lasers, or whatever, i believe its to do with the script. In BA for example, the arm HLT behaves as you describe. In XTA however, i believe it behaves in the method you prefer- since it aims from the centre of the turret rather than switching the aiming point depending on the barrel it is shooting from.
Hypothetically, if you took the XTA style turret and aimed it at a really tiny unit, would it always miss?
No, spring units have a minimum size.
Not s3o's unless I am completely mistaken.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

IIRC, if a weapon is force fired via bos wasn't there a sort of lag caused by it? like it actually can hurt fps?
User avatar
Fanger
Expand & Exterminate Developer
Posts: 1509
Joined: 22 Nov 2005, 22:58

Post by Fanger »

There is no minimum or maximum size requirements for an actual model.. as far as Footprints go, you cannot go below 1x1..
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

smoth wrote:IIRC, if a weapon is force fired via bos wasn't there a sort of lag caused by it? like it actually can hurt fps?
AFAIK no. Never seen that happen.
User avatar
quantum
Posts: 590
Joined: 19 Sep 2006, 22:48

Post by quantum »

The Razor's kiss in CA used to fire four parallel shots. They were fired by bos. I didn't notice lag, but that unit isn't t built in great numbers, usually.
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

Fanger wrote:There is no minimum or maximum size requirements for an actual model.. as far as Footprints go, you cannot go below 1x1..
0x0 works (in the unit data, not the pathing data)
User avatar
lgustavomp
Posts: 27
Joined: 18 Mar 2007, 14:13

Post by lgustavomp »

Cool, i took a look on CA yesterday and i saw an avenger firing 2 lasers parallely. Now i'm just trying to figure out why :?

KDR_11k, do you have some script or a lil bit more information about those 'emit-sfx shot'? Cause i have no clue how whoud be that.

Thx everyone.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Avenger is an airplane, right? Airplanes use turret=0 which makes the shot come out parallel instead of aiming it anywhere.

emit-sfx 2048 from bla spawns a shot from weapon1 at the piece bla, it's documented in the changelog, example code can be found in Kernel Panic.
Post Reply

Return to “Engine”