Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: LAW ENFORCER on April 01, 2003, 03:12:28 pm

Title: Turret recoil
Post by: LAW ENFORCER on April 01, 2003, 03:12:28 pm
I was wondering (and I havent heard this anywhere esle yet) (and if you did happen to have a disscusion about it and come in here and accusingly tell me that its already been done, I will say "yeah, whatever!")
err... lost track a bit there... emm..
I was wondering about turrent barrels, and if they could be set to recoil from shots? you could set up some cool AAA style guns or just cool ones!!;7

so who wants to tell me how terribly hard this would be and complete it the next day?:nervous:
Title: Turret recoil
Post by: IceFire on April 01, 2003, 03:21:14 pm
A turrent doesn't have barrels.

A turret does however.  And probably not without overhauling the entire system.  The only animations on FS ships are the rotations...no other model animations as far as I know.
Title: Turret recoil
Post by: Stryke 9 on April 01, 2003, 03:33:53 pm
Well, judging from the pathing plasma and missile launches use out of turrets, you could do something with the turret axis there possibly, but I'll defer to IceFire on whether that's too much work to be worth it or not...
Title: Turret recoil
Post by: Anaz on April 01, 2003, 04:40:57 pm
Doesn't seem like it would be too hard, because the rotated turret already has its normal pointed in the right direction, it would just be a matter of moving it along that axis.
Title: Turret recoil
Post by: IceFire on April 01, 2003, 06:56:45 pm
Quote
Originally posted by Analazon
Doesn't seem like it would be too hard, because the rotated turret already has its normal pointed in the right direction, it would just be a matter of moving it along that axis.

True...its just that I was told that it would be very difficult.  But hey....if its possible, cool :D
Title: Turret recoil
Post by: Mr. Vega on April 01, 2003, 07:02:03 pm
I smell newtonian physics.
Title: Turret recoil
Post by: Sesquipedalian on April 02, 2003, 04:11:53 am
This sounds like an awful lot of work for a teeny tiny little effect.
Title: Turret recoil
Post by: Petrarch of the VBB on April 02, 2003, 05:42:05 am
It might be small, but will look good. Think of the turrets in HomeWorld.
Title: Turret recoil
Post by: TrashMan on April 02, 2003, 06:12:10 am
Hell, yeah!
Beam cannons? - nice
Gimme turrets!
Title: Turret recoil
Post by: Petrarch of the VBB on April 02, 2003, 07:44:44 am
Beams woldn't have recoil.
Title: Turret recoil
Post by: Nico on April 02, 2003, 08:34:30 am
Quote
Originally posted by Analazon
Doesn't seem like it would be too hard, because the rotated turret already has its normal pointed in the right direction, it would just be a matter of moving it along that axis.

one would think that it's the "moving it along that axis" part which might be difficult, no?
Title: Turret recoil
Post by: KARMA on April 02, 2003, 09:19:10 am
stupid thing: imagine the xwing sfoils
the movement can be described as part of a rotation, with the center point of the rotation at the base of the wings.
wouldn't be possible to set two parameters,
1 to limit the rotation angle from a starting point
2 to make it continuous or by keypress/sexp ?
Title: Turret recoil
Post by: LAW ENFORCER on April 02, 2003, 02:58:26 pm
Quote
Originally posted by Sesquipedalian
This sounds like an awful lot of work for a teeny tiny little effect.


So was your name! :drevil:


It is seriuosly cool when you see huge guns firing - its a bit of an improment instead of a slow green thingy just apperaring....:blah:
Title: Turret recoil
Post by: Anaz on April 02, 2003, 04:49:31 pm
Quote
Originally posted by venom2506

one would think that it's the "moving it along that axis" part which might be difficult, no?


erm...alright..I'll try to explain it a bit more...

The turret is on a line which is formed by the two points (The axis of the turret, which is in this case the center of the turret for barreled turrets, and the turret's fireing point). All that you need to do is make something that updates the position of the turret based on how much time the effect takes, much like how keyframes work. I.E. you know that the turret needs to be at point "a" at time 100. At time 5, it is 5% along that transition, so you can move the position of the turret 5% down the line.


(hmm...now that I think about it, it seems to me that this might cause funny rotation if the axis is moved...because the axis is non-centered on the actual polymodel for the turret arm...I am by no means an expert on the source tho, and that might not be the way it is done)
Title: Turret recoil
Post by: Kazan on April 02, 2003, 04:56:32 pm
it's not really a lot of work - you just specify a recoil magnitude (m) - the recoil barrel speed will be something like 1/2 or 1/4 the projects velocity - you then take the barrels current normal (n)- invert the vector (n') (so n(1,1,1) would become n'(-1,-1,-1))

then figure out  [RC =] OC + (n' * m) and translate the barrel down by correct fractions of RC-OC to produce the velocity
(OC = Object Center)
(RC = Recoiled Object Center)

and then there would be a "return velocity"

while it's translating the turrets rotation would probably have to be locked for simplicities sake

================

or for  complexities sake -- this one makes it so you dont have to lock the position - you just have to perofmr a quick recalculation of your offset each frame [execution cost: 1 comparison, maximum of 3 mulitplications and 2 additions]

take
{ Scalar} Recoil Magnitude (m)
{ Scalar} Recoil Velocity (Vr)
{ Scalar} Return Velocity (Vc) [speed to return to normal from recoil position]
{vector} Current Normal (n) (may change) [and it's inverse n']
{ Scalar} Time since recoil event start (T)
{vector} Object Center (OC)

{ Scalar} Calculate Recoil Time (Rt = m/Vr)

{vector} Based upon T calculate Current Object Position (Position)

Code: [Select]

if (T < Rt)
       Position = OC + n' * T
else
      Position = (OC + n' * m) + n * (Vc * T-Rt);



=======
edit - the adititional translation can be performed by the internal T&L engine
Title: Turret recoil
Post by: Kazan on April 02, 2003, 04:59:48 pm
Quote
Originally posted by Analazon

(hmm...now that I think about it, it seems to me that this might cause funny rotation if the axis is moved...because the axis is non-centered on the actual polymodel for the turret arm...I am by no means an expert on the source tho, and that might not be the way it is done)


fortunately rotating parts don't work correctly if the axis is in the wrong spot - because it rotates along the axis
Title: Turret recoil
Post by: Thorn on April 02, 2003, 05:02:05 pm
That was one of the things that got me with Homeworld...
When that heavy cruiser fires its guns, you can tell theyre big..
They kick and make a loud nose..
Converted to freespace, it looks pretty weak... sounds fine.. but its just not the same without the kick....
Title: Turret recoil
Post by: Kazan on April 02, 2003, 05:11:34 pm
you could specify

Quote

{ Scalar} Recoil Magnitude (m)
{ Scalar} Recoil Velocity (Vr)
{ Scalar} Return Velocity (Vc)


in the subojbect properties

Code: [Select]

$recoil_mag=10
$recoil_velocity=200
$recoil_return=50


recoil mag being in game units (meters)
the other two being in game units per second (meters/sec)
Title: Re: Turret recoil
Post by: diamondgeezer on April 03, 2003, 12:32:55 am
Quote
Originally posted by LAW ENFORCER
I was wondering about turrent barrels


:drevil:
Title: Turret recoil
Post by: J.F.K. on April 03, 2003, 03:22:31 am
The only thing I think it would really be useful for is in-engine cutscenes. Presumably a capship would only be firing turrets in combat, and in combat, who stays still long enough to notice turrets recoiling? Nice idea, but I don't think it's appropriate for ordinary gameplay.
Title: Turret recoil
Post by: TrashMan on April 03, 2003, 03:48:53 am
All terran ships have barreld turrets and the effect would be noticable....
Make it...PLEASE, MAKE IT:nod:
I can't wait to see the effect on the Iowa( sice it has barreld turrets bigger than cruisers[but I do think they're smaller than corvettes], lots of them)
Title: Turret recoil
Post by: Nico on April 03, 2003, 04:12:06 am
Quote
Originally posted by J.F.K.
The only thing I think it would really be useful for is in-engine cutscenes. Presumably a capship would only be firing turrets in combat, and in combat, who stays still long enough to notice turrets recoiling? Nice idea, but I don't think it's appropriate for ordinary gameplay.


well, I'm the kind of player to stop my ship in front of the turret to pummel it till it does, I sure would notice :p
Title: Turret recoil
Post by: Stunaep on April 03, 2003, 06:45:22 am
Quote
Originally posted by venom2506


well, I'm the kind of player to stop my ship in front of the turret to pummel it till it does, I sure would notice :p

listen to him. He models well.
Title: Turret recoil
Post by: Kazan on April 03, 2003, 09:53:47 am
and like i said my algorithm for calculating is is processor-cheap
Title: Turret recoil
Post by: Nico on April 03, 2003, 10:59:09 am
Quote
Originally posted by Stunaep

listen to him. He models well.

the point being? :lol:
Title: Turret recoil
Post by: Petrarch of the VBB on April 03, 2003, 01:46:21 pm
Quote
Originally posted by J.F.K.
The only thing I think it would really be useful for is in-engine cutscenes.


Christ! People are already discussing uses for one of my ideas! This is not at all right! My ideas should be ignored and/or shunned!
Title: Turret recoil
Post by: Fry_Day on April 03, 2003, 02:03:50 pm
Then you should probably go back to posting bad ones ;)

Edit: I'm not suggesting that earlier ideas were bad, but rather trying to garner a laugh or twosmile (or rather, an involuntary twich in the lips caused by a pure luck :) ) with my smart-ass remarks. This is probably pointless, but there are some people who seem to lack a sense of humor, and I won't bet on you not being one of them till I have concrete evidence proving differently :)
Title: Turret recoil
Post by: LAW ENFORCER on April 03, 2003, 02:22:46 pm
Yes, exactly! :nervous:
Title: Turret recoil
Post by: J.F.K. on April 04, 2003, 04:22:19 am
Sorry Petrarch, I thought it was a cool idea ;)

Quote
Originally posted by venom2506
well, I'm the kind of player to stop my ship in front of the turret to pummel it till it does, I sure would notice :p


I stand corrected :lol:
Title: Turret recoil
Post by: Petrarch of the VBB on April 04, 2003, 05:31:19 am
Quote
Originally posted by J.F.K.
Sorry Petrarch, I thought it was a cool idea ;)


Oh it is, but then it isn't for a while, and then it is. It is in a state of qualitular flux.
Title: Turret recoil
Post by: TrashMan on April 07, 2003, 11:18:53 am
I don't see anything wrong with the idea - some ships have BIG guns and the recoil would be visible
Title: Turret recoil
Post by: Petrarch of the VBB on April 07, 2003, 02:31:41 pm
Like the Orion main turrets?
Title: Turret recoil
Post by: TrashMan on April 07, 2003, 04:07:34 pm
Bigger...MUCH BIGGER....
Title: Turret recoil
Post by: Petrarch of the VBB on April 08, 2003, 01:48:10 pm
Elaborate.
Title: Turret recoil
Post by: Kazan on April 08, 2003, 04:44:00 pm
Come on, do the feature-- it's not that hard and not that expensive [cpu and memory wise]
Title: Turret recoil
Post by: karajorma on April 08, 2003, 05:19:09 pm
You may need a way to turn it off though. Beams can look incredibly stupid if they cause recoil.

That said has anyone ever put beams on a multipart cause I can`t think of any off the top of my head.
Title: Turret recoil
Post by: StratComm on April 08, 2003, 05:28:21 pm
The archangel has a couple, but if I can ever find a more stable conversion tool I may change that, and the Orion uses beams on a couple of is big turrets.  The turrets track and fire, but it looks a bit odd sometimes.
Title: Turret recoil
Post by: TrashMan on April 09, 2003, 01:58:33 am
Quote
Originally posted by Petrarch of the VBB
Elaborate.


Like the turrets on some of the ships I'm making.
Well, if the turrets is AT LEAST the size of a cruiser, the recoil would be VERY visible!;7
Title: Turret recoil
Post by: Sesquipedalian on April 09, 2003, 05:12:30 am
...Except that the only FS2 weapons that would generate any recoil at all are flak and secondaries, and a cruiser sized turret for either one of those weapons would be just plain stupid.
Title: Turret recoil
Post by: Terorist on April 09, 2003, 06:10:20 am
Are you claiming we can't mod mass driver weaponry to the game?
Title: Turret recoil
Post by: Sesquipedalian on April 09, 2003, 01:57:50 pm
I'm claiming 1) that putting such weaponry on a turret the size of a cruiser would be preposterous, and 2) that turret recoil on anything firing energy based weapons is also preposterous.
Title: Turret recoil
Post by: Stunaep on April 09, 2003, 01:59:21 pm
yes, but it looks cool.
Title: Turret recoil
Post by: Stryke 9 on April 09, 2003, 03:15:42 pm
Besides which, some sort of hydraulic pump-action would help accelerate a plasma weapon, and the most efficient way to do that would be to put the pump in the turret.

But that's just a rationalization, for those who need such. As Stu said, it would look cool.
Title: Turret recoil
Post by: Terorist on April 09, 2003, 04:59:24 pm
Quote
Originally posted by Sesquipedalian
I'm claiming 1) that putting such weaponry on a turret the size of a cruiser would be preposterous, and 2) that turret recoil on anything firing energy based weapons is also preposterous.
Agreed on both points - but big honking rail guns would be nice and they'd benefit from recoil. I'm talking big, not cruiser-size here, so turrets sized just from a few meters to about 10 meters max ought to be realistic (as in arcade-game-realistic).
Title: Turret recoil
Post by: Kazan on April 09, 2003, 06:47:57 pm
how about the guns in Babylon 5, or S:AAB, etc

they have recoil
Title: Turret recoil
Post by: diamondgeezer on April 10, 2003, 10:26:59 am
D'oh... he's right, folks. And they're laser cannons in S:AAB, too

*sulks*
Title: Turret recoil
Post by: TrashMan on April 10, 2003, 10:53:13 am
A turret that packs a big punch HAS to have recoil!

DO IT! *plays with baseball bat again...*
Title: Turret recoil
Post by: Petrarch of the VBB on April 10, 2003, 03:05:31 pm
Yes. Get on with it!

Long live eye-candy!
Title: Turret recoil
Post by: TrashMan on April 10, 2003, 06:26:15 pm
Quote
Originally posted by Sesquipedalian
I'm claiming 1) that putting such weaponry on a turret the size of a cruiser would be preposterous, and 2) that turret recoil on anything firing energy based weapons is also preposterous.


1. Agree...totally

2. DON'T AGREE....
    Why the hell not? energy based turrets can't have recoil? where did you get THAT silly idea?:wtf:
Title: Turret recoil
Post by: Sesquipedalian on April 10, 2003, 10:48:09 pm
Quote
Originally posted by TrashMan

2. DON'T AGREE....
    Why the hell not? energy based turrets can't have recoil? where did you get THAT silly idea?:wtf:
I got that silly idea from the basic laws of physics.

I never said anything about what energy weapons could or could not do.  Words like "can" and "could" imply possibility and hypothetical validity.  I said they do not.  There is no possibility.  They just plain don't.

Recoil is produced when the propellant that causes the projectile to accelerate is ignited.  For a bullet, that is when the gunpowder in the shell casing is exploded.  For a missile, it is the fuel powering the missile.  When that happens, half of the force goes into moving the projectile forward, while half of it slams into the back of the barrel, pushing it backwards.  Hence, recoil.

Lasers (or any other energy based sci-fi death-ray you like) do not work that way.  There is no propellant to be exploded.  In the case of the simple laser, electricity is passed through some substance (e.g. argon gas), which causes extra energy to be added to the atoms in the gas.  To get rid of this extra energy, the atoms emit photons, which are focused and directed out of the canister as a laser.  Nothing in this process generates recoil.
Title: Turret recoil
Post by: Stryke 9 on April 10, 2003, 11:01:08 pm
Law of Thermodynamic say: Every thing, part move forward, other part move back, yes yes?

Take plasma. Maybe a pound. Throw it at cruiser at .4 c. Boom. Recoil. Recoil of acceleration equipment right through hull and out other side. Throw it at FreeSpace speeds... not so much. Maybe move an inch an hour opposite direction. So make FS bolts move faster.

Or, assume pump-action like said above. It look cool. We happy. In pants. Change clothes, clean keyboard, remind selves to lose moving-thingy fetish.
Title: Turret recoil
Post by: Sesquipedalian on April 10, 2003, 11:25:01 pm
:sigh:  In more detail now about the laser: each individual atom spews its photon in a random direction.  Only those photons which happen to be generated in a direction aligned with the main axis of the gas chamber become part of the emitted laser beam.  The rest are lost.  Meanwhile, since each atom releases its photon in a random direction, each atom recoils in the opposite random direction.  Since it is random, there will be an even dispersal pattern for all the photons, and thus for all the recoiling atoms.  Therefore, the vector sum of all the recoiling atoms will be 0 in all dimensions, and thus there will be no overall force directing the mass of atoms as a whole in any one direction.

In other words, thermodynamics is not disobeyed, but in a laser, all the reactionary force is absorbed by the gas atoms themselves and is not transfered to the surronding equipment.
Title: Turret recoil
Post by: Stryke 9 on April 10, 2003, 11:49:22 pm
Er... for one thing, if lasers just filtered out everything but the light going in one specific direction, you'd need a 75w lightbulb or more to get as much power as is in one of those little pen lasers, and they'd make damnably poor weapons. There's generally a good bit of focussing there, I believe. For another, since you'd be taking all the light from one direction (the size of the arc is neither here nor there right now), that'd mean there was a slight disproportion, with a little more light bouncing off the back of the generation chamber than the front. Not enough to generate a noticeable effect as far as movement goes (personally, I'd be more worried about being deep-fried, blinded, or irradiated, depending on the efficiency and generation type of the laser), but still technically some.

But with the exception of beams, none of the weapons in Freespace are likely candidates as lasers, and we've already assessed that beams wouldn't recoil.
Title: Turret recoil
Post by: Sesquipedalian on April 11, 2003, 12:09:53 am
They DO make damnably poor weapons.  Substances used in lasing, however, are much more efficient than a tugsten wire at producing light, in that almost none of the electricity's energy is converted into thermal energy.  Further, in order to reduce the amount of energy lost through the photons which head off in the wrong directions, the interior of the chamber is all reflective, so that the photons will bounce back into the gas cloud again and hopefully be absorbed by another atom, exciting it and causing another photon to be again emitted.  If this one is headed in the right direction, good enough.  Otherwise, the process is repeated. Less electricity is needed this way, though the net effect so far as our recoil question is concerned is zero.

If they aren't supposed to be lasers, then what the heck are they?
Title: Turret recoil
Post by: Stryke 9 on April 11, 2003, 12:23:02 am
I think some were supposed to be lasers ('fact, I recall one being a maser, which wouldn't be visible at all. Though it would make for a nasty weapon), but since they all just looked like slow-moving globs of glowing matter, and we're evidently going for accuracy with the whole recoil thing (which is a good thing to some extent, mind, I like my SF hard), call 'em plasma and tracers. Which would have a degree of recoil, though plasma probably not a whole lot.
Title: Turret recoil
Post by: TrashMan on April 11, 2003, 07:20:12 am
Laws of physiscs?!!:rolleyes:

Just what do you know about weapons in FS and the way they work.... PLEASE, enlight me!
I had a talk with a profesor of mine (who works at CERN!!!), and since you don't exacly know how they work, and you don't have a degree in physics....SHUT UP!
Title: Turret recoil
Post by: J3Vr6 on April 11, 2003, 08:38:57 am
Now now, no one has to get offensive.  Sesqu-whatever is giving his opinion, and so is Stryke.  Just because one has a differing opinion doesn't mean anyone has a right to shut someone else up.  I'd expect that in an Iraq debate, but not in here.

I don't really care if lasers in the real world don't recoil or if Stryke doesn't wear pants.  It looks cool (the recoil, not Stryke in his under roos) and many people wish to see it implemented.  If one was to get into the debate of what should be realistic in this game, then there wouldn't be any sound in FS.  But the sound is there to give ambiance and emersion.

So putting recoil in the turrets (except beams) would make the game more enjoyable, and would actually make the turrets seem like they're firing deadly weaponry.

So if it's possible to implement, and someone has the time to get to it, then please consider it. :D
Title: Turret recoil
Post by: Kazan on April 11, 2003, 10:21:52 am
Sesq: If you don't like recoil don't make any ships that use it and/or disable it (like a command line option, or options screen option, etc)


Everyone else: LETS HAVE OUR ROCKIN RECOIL!
Title: Turret recoil
Post by: TrashMan on April 11, 2003, 12:23:12 pm
Quote
Originally posted by Kazan
Sesq: If you don't like recoil don't make any ships that use it and/or disable it (like a command line option, or options screen option, etc)


Everyone else: LETS HAVE OUR ROCKIN RECOIL!



I couldn't have saidit better myself!
GO FOR IT!:D

EDIT: It was never my intention to get offensive....sorry
Title: Turret recoil
Post by: Sesquipedalian on April 11, 2003, 12:33:51 pm
Quote
Originally posted by TrashMan
Laws of physiscs?!!:rolleyes:

Just what do you know about weapons in FS and the way they work.... PLEASE, enlight me!
I had a talk with a profesor of mine (who works at CERN!!!), and since you don't exacly know how they work, and you don't have a degree in physics....SHUT UP!
I believe I just did tell you what I know, and I am more inclined to trust it than what you think you heard from your professor.  Furthermore, I did in fact clean house in physics, but eventually gave it up because I wanted to pursue something more specifically relevant and meaningful to the human soul.  I know what I am talking about.  I will admit I am rather in the dark about why you are being so fabulously rude, however.

Thankfully, there are some more reasonable folk around:
Quote
Originally posted by J3Vr6
Now now, no one has to get offensive.  Sesqu-whatever is giving his opinion, and so is Stryke.  Just because one has a differing opinion doesn't mean anyone has a right to shut someone else up.  I'd expect that in an Iraq debate, but not in here.

I don't really care if lasers in the real world don't recoil or if Stryke doesn't wear pants.  It looks cool (the recoil, not Stryke in his under roos) and many people wish to see it implemented.  If one was to get into the debate of what should be realistic in this game, then there wouldn't be any sound in FS.  But the sound is there to give ambiance and emersion.

So putting recoil in the turrets (except beams) would make the game more enjoyable, and would actually make the turrets seem like they're firing deadly weaponry.

So if it's possible to implement, and someone has the time to get to it, then please consider it. :D
Quote
Originally posted by Kazan
Sesq: If you don't like recoil don't make any ships that use it and/or disable it (like a command line option, or options screen option, etc)


Everyone else: LETS HAVE OUR ROCKIN RECOIL!
Ah, but you misunderstand me, gentlemen.  :)  If someone wants to put the required code in for recoil, fair enough, and I have no objection to its being there.  It will indeed look cool.  My argument here is all derivative of contesting Trashman's statement that lasers on giant turrets would produce "very visible" recoil; it is not derivative of any particular opposition to having the effect put in.  To put it finely, I am not saying anything about whether someone could put in recoil for the sake of visual effect, but only contesting the notion that someone should put it in for the sake of realism.  If someone wants to code it, by all means do so, but those who demand it to be done have no justification.
Title: Turret recoil
Post by: CP5670 on April 11, 2003, 12:39:31 pm
Quote
Furthermore, I did in fact clean house in physics, but eventually gave it up because I wanted to pursue something more specifically relevant and meaningful to the human soul.


such as pure mathematics, right? :D

Anyway, this recoil effect sounds like a good idea, but mainly just for the cool graphical effect rather than realism. It might be realistic for missiles, but none of the default FS2 ships have missile launchers placed on the multi-part barrelled turrets, which are the only ones for which the recoil could be used.
Title: Turret recoil
Post by: Sesquipedalian on April 11, 2003, 12:42:32 pm
Quote
Originally posted by TrashMan
EDIT: It was never my intention to get offensive....sorry
Apology accepted. :)

In the future, however, be aware that screaming at people to shut up, rolling yours eyes, and laying on thick, insulting sarcasm can't help but be offensive.  You might consider changing that sort of behaviour. :)
Title: Turret recoil
Post by: Fry_Day on April 11, 2003, 02:13:31 pm
I do find the idea of a laser having recoil kinda hilarious, though. I mean, it's basically like a lightbulb having recoil. Now, wouldn't that be funny :D
Title: Turret recoil
Post by: TrashMan on April 11, 2003, 03:25:22 pm
I had a rugh day....it's no excuse, I know...
You allso sounded like you...well...like someone who THINKS to know all and patronizes all other....
I'm not saying you are like that, but you sounded like that....


Again...sorry...
I really want to see recoil in the game, be it laser, plasma, ion burst, missile, or god-knows-what-else
Title: Turret recoil
Post by: karajorma on April 11, 2003, 04:45:42 pm
Quote
Originally posted by CP5670
Anyway, this recoil effect sounds like a good idea, but mainly just for the cool graphical effect rather than realism. It might be realistic for missiles, but none of the default FS2 ships have missile launchers placed on the multi-part barrelled turrets, which are the only ones for which the recoil could be used.


I`d like to see it on flak turrets more to be honest. I think that it would look really good on them and would also be fairly realistic (well if FS2 flak is anything like modern day flak).

I think it would look silly on beam turrets but it is still worth implementing.

My question is where are you going to put the on/off switch? In the pof, FRED or as a command line arguement?
Title: Turret recoil
Post by: Anaz on April 11, 2003, 04:51:06 pm
how about on the turret entry in the .tbl? add something to the turret, perhaps a 4th value to the subsystem, and that would be the recoil distance. If it didn't find a value, then it would assume 0. Thus allowing backwards compatability.
Title: Turret recoil
Post by: LAW ENFORCER on April 11, 2003, 05:52:42 pm
My original though was to .tbl it... definatly - then you can add recoil to old ships as well as new ones in an easy way...;7
Title: Turret recoil
Post by: Kazan on April 11, 2003, 07:34:16 pm
um.. read the entire thread, i told you where the data would go - in the properties of the SOBJ in the POF!!!
Title: Turret recoil
Post by: Kazan on April 11, 2003, 07:35:52 pm
Quote
Originally posted by Kazan
you could specify



in the subojbect properties

Code: [Select]

$recoil_mag=10
$recoil_velocity=200
$recoil_return=50


recoil mag being in game units (meters)
the other two being in game units per second (meters/sec) [/B]


on another thought we could make recoil_velocity a multiple of the velocity of the proticle - from the only rule would be recoil_velocity > 0
Title: Turret recoil
Post by: LAW ENFORCER on April 11, 2003, 08:04:20 pm
'I' knew about that but im lazy, do I HAVE to open up every POF???:blah:

I really hope this is done by the way:yes:
Title: Turret recoil
Post by: Kazan on April 11, 2003, 08:43:05 pm
um, someone would make updates pofs with the recoil info and release them in the fs2_open vp.... then the "on-off" option would be added to the graphics screen
Title: Turret recoil
Post by: LAW ENFORCER on April 11, 2003, 09:09:07 pm
I actually ment my models but I just remembered, Im redoing all my stuff (and its not THAT much at the moment) to optimise stuff so I proably wont notice that then.... good:yes:

I hope thou programmers of the code look upon us kindly and work the anvils of code for us with your magic-like skill and introduce us to the "turret recoil".... Kind sirs....



Whats the 'graphics screen'?
is it the 'options->video' style one (in most games)
or some mission/.tbl/pof/computer related thingy???
Title: Turret recoil
Post by: Kazan on April 11, 2003, 09:28:52 pm
Quote
Originally posted by LAW ENFORCER
Whats the 'graphics screen'?
is it the 'options->video' style one  



that one
Title: Turret recoil
Post by: Scuddie on April 12, 2003, 02:08:49 am
I'd hate to bust nuts, but in zero gravity, and atmospheric friction, there is no such thing as recoil.  Now that I made everyone sad, time to go on :D.
Title: Turret recoil
Post by: Goober5000 on April 12, 2003, 02:36:46 am
Quote
Originally posted by Scuddie
I'd hate to bust nuts, but in zero gravity, and atmospheric friction, there is no such thing as recoil.  Now that I made everyone sad, time to go on :D.


psst... Newton's Third Law...

;)
Title: Turret recoil
Post by: karajorma on April 12, 2003, 03:46:09 am
Quote
Originally posted by Scuddie
I'd hate to bust nuts, but in zero gravity, and atmospheric friction, there is no such thing as recoil.  Now that I made everyone sad, time to go on :D.


And there's no G-force in space either right? :rolleyes:

Yet another example of how a little knowledge can be a dangerous thing.
Title: Turret recoil
Post by: diamondgeezer on April 12, 2003, 11:01:39 am
Scuddie mate, in zero-g if you fire a gun one way, you will go in the opposite direction. That's physics, that is :cool:
Title: Turret recoil
Post by: TrashMan on May 15, 2003, 05:45:58 am
Bring this thread back from the dead.......
Title: Turret recoil
Post by: LAW ENFORCER on May 15, 2003, 06:54:18 am
good idea!

Anybody thought about this since the thread... passed away
Title: Turret recoil
Post by: Raptor on May 15, 2003, 10:47:54 am
I found it, buryed back on page 5!

This would be so cool, particually for the weapons that I am plaing on introducing in my half-planed campain;)


(god, you could watch this guy for hours......:hopping: )
Title: Turret recoil
Post by: TrashMan on May 16, 2003, 03:44:01 am
Yeh....great animation...:hopping:

Recoil wold be so cool!
Title: Turret recoil
Post by: Nico on May 16, 2003, 04:49:33 am
Quote
Originally posted by Fry_Day
I do find the idea of a laser having recoil kinda hilarious, though. I mean, it's basically like a lightbulb having recoil. Now, wouldn't that be funny :D


mmh, funnily enough, that's exactly how the ion canon looks like in the empire strikes back, a light bulb that recoils when pooping :doubt:
everybody, flame SW, NOW!!!! rah, all those laser canons have recoil too!!!!
Oh, but I guess everybody will forgive SW coz it's SW :doubt:
bah.
Title: Turret recoil
Post by: Black Wolf on May 16, 2003, 06:20:44 am
Quote
Originally posted by Venom

Oh, but I guess everybody will forgive SW coz it's SW :doubt:
bah.


Hmmmmm... yep. probably :D
Title: Turret recoil
Post by: KARMA on May 16, 2003, 08:01:13 am
recoil would be cool but  i'd like more turretts not firing through the hull, that don't fire if a target is not viewable and that loose the target if the ship doesn't return in sight in a reasonable amount of time
fov center different than normals and maybe normals not -1/+1  for multipart turretts would be a dream:)
Title: Turret recoil
Post by: J3Vr6 on May 16, 2003, 08:24:36 am
Recoil rocks, please consider adding it to the SCP.

Not to derail this topic, but I'd also like to see turrets/caps not fire at a target if there is something is obstructing the view of that turret from its target.  I keep seeing caps trying to fire at a ship when one of their own ships is between them, causing damage to their buddy (which could be a lot if its a beam turret).
Title: Turret recoil
Post by: Sesquipedalian on May 17, 2003, 02:01:47 am
Quote
Originally posted by Venom

Oh, but I guess everybody will forgive SW coz it's SW :doubt:
bah.
Nope.  Lasers with recoil are stupid, in SW or not.  It looks cool, and if someone wants to code it go ahead, but it is still technically stupid.
Title: Turret recoil
Post by: TrashMan on May 17, 2003, 03:51:22 am
You want a "realistic" space-sim? Go play Homeplanet.
FS2 was never too realistic so there is no sense in arguing it beeing not physicly sound, for a lot of stuff isn't anyway....
Title: Turret recoil
Post by: Nico on May 17, 2003, 04:11:58 am
Quote
Originally posted by Sesquipedalian
Nope.  Lasers with recoil are stupid, in SW or not.  It looks cool, and if someone wants to code it go ahead, but it is still technically stupid.


well, technically, they're not lasers. take a ball of plasma. you have to give it momentum for it to reach the target, isn't it? so?
and trashman, if you want a realistic  space-sim, you have space simulator and all those space shuttle/soyouz simulators with 400 keys used. everything else is not realisitc :p
Title: Turret recoil
Post by: TrashMan on May 17, 2003, 03:30:37 pm
I'm gonna bump this thread untill I see recoil... or untill someone take the mouse from my cold, dead body!!!
Title: Turret recoil
Post by: Deepblue on May 17, 2003, 09:56:08 pm
BANG!
Done.  :D
Title: Turret recoil
Post by: Kazan on May 18, 2003, 09:09:20 am
bump, use my efficient algorithm or die :D
Title: Turret recoil
Post by: TrashMan on May 18, 2003, 01:27:57 pm
It takes more than one bullet to stop me!

[SIZE=10]ULTRA - SUPER - EXTRA BUMP[/SIZE]
Title: Turret recoil
Post by: Raptor on May 18, 2003, 05:59:12 pm
Coders, please put this into the code before the amount of 'OTT' kills me.........
Title: Turret recoil
Post by: TrashMan on May 18, 2003, 06:22:43 pm
They better....
* plays with his baseball bat agian...*
Title: Turret recoil
Post by: KARMA on May 18, 2003, 07:14:03 pm
guys, be quiet with those unlimited and sometimes hysterical bumps, they have done a lot, there's a lot to do and they are not paid for doing it...and consider that each modificiation can't be done in 5 minutes after you post...
just discuss about things and make sure they know that a thing is desired but no reason to be agressive or to pretend things like if they are your slaves;)
Title: Turret recoil
Post by: Goober5000 on May 18, 2003, 07:58:51 pm
Thanks, Karma. :)

Turret recoil is an aesthetic feature that doesn't affect practical gameplay in the slightest.  Hence it has a low priority.  Considering that our main focus right now is squashing old bugs and restoring deleted features, you probably won't see this for a long time, if at all.  Keep in mind that something like this requires several hours of programming and debugging to implement, and that's dependent on a programmer having the free time and the motivation to pursue it.

If you really want to see turret recoil included, make like Bobboau and learn C++ for yourselves.  Bumping the thread every five hours is not only annoying to forum readers, it makes coders less willing to consider your request.
Title: Turret recoil
Post by: Sesquipedalian on May 19, 2003, 01:41:23 am
Quote
Originally posted by Goober5000

If you really want to see turret recoil included, make like Bobboau and learn C++ for yourselves.  Bumping the thread every five hours is not only annoying to forum readers, it makes coders less willing to consider your request.
Hear, hear!
Title: Turret recoil
Post by: LAW ENFORCER on May 19, 2003, 05:03:48 am
am learning C++ (have been for a while) but not good enough to get anything done yet! You'll be sorry if ya dont! Wont the SW MOD want turret recoil :ha:


oh look now its a really high priority! "Stop the press I mean progreamming! SW MOD wants a feature forget the bugs lets do MOD supported programming!":hopping: :mad2:

J/K ;)
Title: Turret recoil
Post by: HotSnoJ on May 19, 2003, 07:27:26 pm
Haven't read too much of this thread but what the heck?!

Well my idea is you use a 3 part turret. Base (duh!), barrels for the recoil, and a third model to handle the turret barrel rotation (What the barrel's previously did). In this concept you get recoiling barrels without having to worry about rotations and locations.



I'll try to get some images together to better convay my idea later. :)
Title: Turret recoil
Post by: TrashMan on May 20, 2003, 04:13:25 am
Sounds good.....:D
Title: Turret recoil
Post by: karajorma on May 20, 2003, 08:05:05 am
Sounds like a pain in the neck to me. Multi-part turrets are already confusing as it is.

If you do it the way Kazan suggested the turrets on existing ships would have recoil too. If you start making it so that you need a special model format only new ships will have the ability.

Also it's my impression that the Turret code is a little hacked together as it is (apparently it was problem with colision detection and turrets that prevented them from being able to put multi-parts on the sides of ships). Changing the way turrets work might cause similar problems with the turrets we do have.
Title: Re: Turret recoil
Post by: Edwin on May 23, 2003, 05:57:17 pm
Quote
Originally posted by LAW ENFORCER

I was wondering about turrent barrels


what's the difference between a turret and a turrent?
Title: Turret recoil
Post by: Goober5000 on May 23, 2003, 10:53:38 pm
Nothing.  It's a common spelling mistake.  The correct spelling is turret.