2020-10-27 01:28 EDT


View Issue Details Jump to Notes ] Related Changesets ]
IDProjectCategoryView StatusLast Update
0000591FSSCPgameplaypublic2012-01-09 13:06
ReporterWanderer 
Assigned ToWanderer 
PrioritynormalSeveritytweakReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000591: Slowly rotating turrets do not fire on their 'barrel line'
DescriptionIf turret rotation is too slow the turrets fire shots from the firepoints but not on their 'barrel line'. So currently turrets are 'only' for the visual effects without them having any real function in gameplay.
Additional InformationA (hopefully clarifying) pic is included. And short but poorly named thread is in HLP/FS/FSModding/Corkscrew and swarm with turrets?
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0003954

phreak (developer)

Is there a mission that doesn't use mods to demonstrate this. I don't want to be downloading something very large that I won't using all that much.

~0003955

Axem (reporter)

How about the Fenris/Leviathan attempting to fire their Fusion Mortar? That missile turret turns slow and they fire way too early to ever hit something right away.

~0003959

Wanderer (developer)

Last edited: 2005-11-30 04:55

All this is about multi-part turrets:
Well i have found a sort of a 'hackfix' or 'override' that produces the result i want to get with standard primaries & non-homing secondaries. The use of '$Swarm: 1' forces multi-part turrets to fire along their barrel lines. It doesn't function with flaks or beams though. I can try to make a simple demonstrative mission to show what i mean, but simply either using Fenris/Leviathan as Axem said or by increasing the rotation time of turrets can be used to get the effect visible.

This happens even with 'fast' turrets but the effect can not be as easily seen. What i was hoping (i really do not know if it is possible) was that turrets would only fire at the target when the angle between the respective vectors (line of the barrel and the line from the turret/firepoint to the target) would be small enough. Just to bring the effect of the slow turret rotation (and to make multipart turrets to be just a little more than visual decoration) into to the game as currently turret rotation has no real function without the $Swarm option.

I have already a partial solution to the problem so for now this problem can be left as it is.

edited on: 11-30-05 04:55

~0006930

taylor (administrator)

* BUMP *

If someone can get me a quick test mission for this I'll have a look. The "hackfix" using swarms would likely no longer work since I fixed the swarming bug for turrets. While this particular problem won't be the default behavior, it could be either an ai_profiles setting or a ship flag (ai_profiles would work better for the code though, as a global option).

I know exactly where/how to fix this, since I un-fixed it for the swam bug on single part turrets, so I just need to know if the ai_profiles route is good enough, and to get a test mission to try it out before commit. If I can get a test mission at some point this weekend then I'll go ahead and code up the fix and make sure it gets into 3.6.9.

~0006931

Axem (reporter)

I just uploaded a mission with a Levi attacking a Ma'at with the player close to the missile turret. For the first 2 or 3 shots, the missiles won't fire correctly. I hope that's good enough for what you need.

~0006938

The Trivial Psychic (reporter)

Taylor, if you're gonna find a way to selectively enable/disable the turret-normal-only targetting for swarming (or perhaps, even for non-swarming), it might be useful to have it as part of the subsystem data, because things like multi-parts aren't realy a problem for such behaviour, but single parts do the straight fire only. That way, no matter what kind of weapon is placed on a turret, it would always use the same targetting method selected by the tables. Have all weapons do standard target by default, but a subsystem flag like "+aim_by_normals" (or perhaps the bracket style subsystem flags that WMC has been proposing or introducing) would be added perhaps to multi-part turrets, so any weapon mounted on that subsystem would stick to just firing down the normals, so all shots would appear parallel to the barrels.

~0006941

taylor (administrator)

@Axem: Thanks, that worked out pretty well. I don't suppose I could trouble you for something a bit more complex though? Something with multiple multi-part turrents with various weapons: beams, flak, missiles, lasers, and swarming and non-swarming laser/missile variants. I don't think that there is one ship which can do all of that at once, so perhaps two/three ships attacking each other in the various configs. But no weapons on single-part turrets please (easier for me to keep track of in the code that way).


@TP:
I'm not against the per-turret thing, but the way I have it setup now it will only apply to multi-part turrets regardless of the weapon config. I guess this is what needs to be decided: Would this be better to have on a per-turret basis, only affecting some of the multi-part turrets and with this, the ability to do it for single-parts as well? Or, would you want this as a global option which would turn it on for all multi-part turrets without having to modify each ships tbl entry?

Both are actually possible without making the code all messy. But obviously, having the global option enabled would invalidate any per-turret settings from the tbl for multi-parts. The tbl setting could still be used for single-parts though, regardless of the global option.

I just can't see the per-turret tbl setting all that useful though, since you are likely to either want this or not, and there are other ways to deal with this in the single-part turret case. But then I'm not the best judge of such things either.

~0006943

The Trivial Psychic (reporter)

The problem is, I can foresee situations where you might want to enable non-normal tracking on multi-part, such as situations when the arms are too far apart on a turret when its trying to target a small fighter craft. Perhaps a global non-normal tracking for single-part turrets, unless a turret is given a proper flag, and and global down-the-barrel targetting for multi-parts, unless a turret is given the proper flag to enable otherwise. The only problem I see with this is that it would affect retail behaviour. FS2 is balanced so that single-shot weapons would travel independant of the barrel on multi-parters. Although we may not like this behaviour, the fact is that its prescedent. That's why I suggest a global all-fire-independant-of-barrel-direction, for both swarming and non-swarming weapons, unless a subsystem flag is added to the turret.

~0006944

taylor (administrator)

Hmm, how about I just go with the disabled-by-default, enable-with-ship-tbl-entry-per-turret approach for now. A global ai_profiles flag can always be added later for single and/or multi part turrets down the road.

This would solve the immediate problem in the most flexible way, leave the default behavior for all turrets, and allow a pretty easy global-option upgrade in the future.

I'll try and get a test build out for this before the weekend is over with.

~0006977

Axem (reporter)

Hope this one works better. Both "versions" should have what you need, but I forgot to put in swarming missiles in the first one, so I added that to the slightly newer version.

~0006987

taylor (administrator)

That was perfect. Thanks. I didn't see any problems either, so I'm assuming that the code is sound.

I'll get a test build out as soon as I get some more, unrelated, code fixes ready to go (there will be a LOT to test in the new build). Then you can let me know if this is actually working the way you needed/expected.

~0007026

taylor (administrator)

The code is now in CVS (* the 3_6_9 branch only for now *). I'll wait to resolve this until someone actually tests it though.

The new ships.tbl flag is "+fire-down-normals" and applies to each turret individually.

A test build will be released before the weekend is over.

~0007032

taylor (administrator)

Ok, somebody grab http://icculus.org/~taylor/fso/testing/rc7dot9.rar, and see if this is fixed when using the new tbl entry (it goes just before the $animation entry btw).

~0007038

Wanderer (developer)

screenshot0045.jpg demonstrates what happens with the option.. So the turrets fire more closely to their normals (a huge improvement to the earlier) but still it allows for this. Though that isn't actually a problem but there are some others. Now all missiles fired from turrets fly directly towards their targets and the earlier 'fly some distance straight and then turn to face the target' (aka vertical launch system) doesn't function any more. Also if used with single parts the turret fires only when the target is reasonably close to the turrets normal, and when it fires it shoots directly towards the target ( = not on the turret normal).

~0007128

Arcanum (reporter)

I've observed that turrets appear to "lurch". It will be in one position, and when it fires, it will instantaneously rotate to another position, which is usually between where it was and the firing vector.

Would it be possible to implement something along the lines of getAimVector -> rotateTurret(AimVector) -> fireTurret ?

~0007129

taylor (administrator)

"Now all missiles fired from turrets fly directly towards their targets and the earlier 'fly some distance straight and then turn to face the target' (aka vertical launch system) doesn't function any more."

Is this with multi or single part turrets. A multi-part will be forced to actually face the target before it can fire, when the flag is used. I'll probably need a test mission/model/tbm in order to work this one out.

"Also if used with single parts the turret fires only when the target is reasonably close to the turrets normal, and when it fires it shoots directly towards the target ( = not on the turret normal)."

For swarm or non-swarm turrets? The code is different for the two so that is something I need to know. Also, I need to know if the problem effects both, or just one of the types.


"I've observed that turrets appear to "lurch". It will be in one position, and when it fires, it will instantaneously rotate to another position, which is usually between where it was and the firing vector."

I think that is something that Bobboau was/is working on. That isn't for this bug though, and not for 3.6.9 either.

~0007130

Axem (reporter)

I have noticed that even with the "+fire-down-normals", the turrets are not firing like the should be.

http://img.photobucket.com/albums/v109/NarfPics/wrongway.jpg

In this pic, the ship has all its turrets with +fire-down-normals and the subobject animation speeds are cranked up high so those shots shouldn't even be hitting me. The weapons being fired all have a +swarm field.

~0007132

Wanderer (developer)

Last edited: 2006-11-15 02:39

My test results using the linked build:

Multiparts without new flag
 * Primaries
  - Swarm: Shoots directly at the target regardless of barrel line.
  - Non-Swarm: Shoots directly at the target regardless of barrel line.
 * Secondaries
  - Swarm: Shoots indirectly at the target redardless of barrel line
  - Non-Swarm: Shoots directly at the target regardless of barrel line.
Singleparts without new flag
 * Primaries
  - Swarm: Shoots directly at the target regardless of barrel line.
  - Non-Swarm: Shoots directly at the target regardless of barrel line.
 * Secondaries
  - Swarm: Shoots indirectly at the target redardless of barrel line
  - Non-Swarm: Shoots directly at the target regardless of barrel line.
Multiparts with new flag
 * Primaries
  - Swarm: Shoots when target is close to the barrel line
  - Non-Swarm: Shoots when target is close to the barrel line
 * Secondaries
  - Swarm: Shoots indirectly when target is close to the barrel line
  - Non-Swarm: Shoots indirectly when target is close to the barrel line
Singleparts with new flag
 * Primaries
  - Swarm: Shoots when target is close to the barrel line
  - Non-Swarm: Shoots when target is close to the barrel line
 * Secondaries
  - Swarm: Shoots indirectly when target is close to the barrel line
  - Non-Swarm: Shoots indirectly when target is close to the barrel line

EDIT: Tested also Type 4 beams, behaviour is similar in both single and multipart turrets. Without the flag beams fire when target is in fov, shoot directly on the barrel line. With the flag beams fire only when the barrel angle is relatively close to the target. Still only on the barrel line.

~0007149

taylor (administrator)

Ok, found the problem. It was a stupid little thing I did without thinking about it, trying to optimize the submodel animation code. The problem was that the turrets didn't process fully for movement each frame which led to the positioning issue. Reverting that part of the change fixed the problem.

~0007168

taylor (administrator)

Try: http://icculus.org/~taylor/fso/testing/rc7dot9x.rar

~0007198

Wanderer (developer)

Apart from much smoother turret movements no change from the earlier test. Post 0007132. Axem tested it too and saw no change from the status that was reported earlier.

~0007202

taylor (administrator)

Ok, I'll take another look.

~0009479

taylor (administrator)

Not going to work on this.

~0009480

Wanderer (developer)

Last edited: 2008-07-17 12:48

I have this as a feature in my branch. A new turret/subsystem flag that prevents the turret from firing unless desired and current barrel angles match. But as how well it works.. in my tests i saw no problems but i have had very few people testing my builds.

EDIT: Just to make sure, the fix/feature is not in trunk.

~0009601

Wanderer (developer)

Fixed - but not rigorously tested - in wanderer branch.
+Notes

+Related Changesets

-Issue History
Date Modified Username Field Change
2005-10-15 03:46 Wanderer New Issue
2005-10-15 03:46 Wanderer File Added: screen0014.jpg
2005-11-29 18:44 phreak Note Added: 0003954
2005-11-29 19:28 Axem Note Added: 0003955
2005-11-30 04:53 Wanderer Note Added: 0003959
2005-11-30 04:55 Wanderer Note Edited: 0003959
2006-10-19 12:01 taylor Note Added: 0006930
2006-10-19 12:01 taylor Status new => assigned
2006-10-19 12:01 taylor Assigned To => taylor
2006-10-19 12:19 Axem File Added: LeviVSMaat.fs2
2006-10-19 12:20 Axem Note Added: 0006931
2006-10-19 15:41 The Trivial Psychic Note Added: 0006938
2006-10-20 12:15 taylor Note Added: 0006941
2006-10-20 16:20 The Trivial Psychic Note Added: 0006943
2006-10-20 17:35 taylor Note Added: 0006944
2006-10-21 14:49 Axem File Added: MultiPartMayhem.fs2
2006-10-21 14:50 Axem File Added: MultiPartMayhem.fs2
2006-10-21 14:53 Axem Note Added: 0006977
2006-10-23 14:52 taylor Note Added: 0006987
2006-10-27 16:40 taylor Note Added: 0007026
2006-10-27 16:40 taylor Status assigned => feedback
2006-10-28 15:07 taylor Note Added: 0007032
2006-10-29 01:34 Wanderer File Added: screen0045.jpg
2006-10-29 01:40 Wanderer Note Added: 0007038
2006-11-14 22:31 Arcanum Note Added: 0007128
2006-11-14 23:51 taylor Note Added: 0007129
2006-11-15 00:04 Axem Note Added: 0007130
2006-11-15 02:21 Wanderer Note Added: 0007132
2006-11-15 02:39 Wanderer Note Edited: 0007132
2006-11-22 03:02 taylor Note Added: 0007149
2006-11-25 16:27 taylor Note Added: 0007168
2006-11-27 13:05 Wanderer Note Added: 0007198
2006-11-27 16:27 taylor Note Added: 0007202
2008-07-17 12:39 taylor Note Added: 0009479
2008-07-17 12:39 taylor Assigned To taylor =>
2008-07-17 12:39 taylor Status feedback => new
2008-07-17 12:47 Wanderer Note Added: 0009480
2008-07-17 12:48 Wanderer Note Edited: 0009480
2008-08-23 05:15 Wanderer Note Added: 0009601
2008-08-23 05:15 Wanderer Status new => feedback
2008-08-23 05:16 Wanderer Status feedback => assigned
2008-08-23 05:16 Wanderer Assigned To => Wanderer
2008-08-23 05:16 Wanderer Status assigned => feedback
2009-05-25 07:49 Wanderer Status feedback => resolved
2009-05-25 07:49 Wanderer Resolution open => fixed
2012-01-05 17:55 taylor Changeset attached => Import 2012-01-05 17:52:05 fs2_open_3_6_9 r3668
2012-01-05 17:55 taylor Changeset attached => Import 2012-01-05 17:52:05 trunk r3711
2012-01-09 13:06 taylor Changeset attached => fs2open_websvn fs2_open_3_6_9 r3668
2012-01-09 13:06 taylor Changeset attached => fs2open_websvn trunk r3711
+Issue History