Missile malfunction - bug or feature?

General discussion for players of Oolite.

Moderators: winston, another_commander

User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Missile malfunction - bug or feature?

Post by Smivs »

Ships that have previously been fine are now suffering this, so I don't think it can be a launch position problem. The only change is to the js AI, so I'm thinking the problem may lie there.

Edited to add->
just looking through the js files and I came across this comment (line 4306) in the 'oolite-priority.js - the missile AI calls this worldscript on start (launch).
/* tilt down and accelerate - assumes missile is co-aligned to
* ship on launch, and launched from below the ship */
the 'and launched from below the ship' caught my eye. Has the js been developed using the Cobra 3 only? If so this could explain things.
Commander Smivs, the friendliest Gourd this side of Riedquat.
Fritz
---- E L I T E ----
---- E L I T E ----
Posts: 591
Joined: Sun Jul 12, 2015 2:30 pm
Location: Bavaria, Germany
Contact:

Re: Missile malfunction - bug or feature?

Post by Fritz »

Thank you, Norby, the OXP seems to work perfectly! My quick-and-dirty fix would have been to change all the launching positions in the shipdata.plist...

The faster missiles should change the game because there is less time to hit the ECM. It makes enemy missiles more likely to hit when fired at a short distance, but it should also make the player missiles more effective. I'll now launch for a test flight and hopefully I'll find some well armoured pirates!

@Diziet Sma (off topic):
I know the precision mode, without it aiming would be almost impossible (that was the one of the starting difficulties I had with Oolite!). But the Adder in precision mode behaves like the Python in normal mode! I never used a joystick with Oolite, I don't even own one, but it probably allows more precise control. And perhaps it's a bad idea to change from a Python to an Adder...
"You wouldn't kill me just for a few credits, would you?" – "No, I'll do it just for the fun!"
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Missile malfunction - bug or feature?

Post by Norby »

Fritz wrote:
faster missiles
The travel speed is not changed (750m/s), moreover still break at start down to the normal speed so no change after the first half second. I think the effect to the gameplay is marginal due to at point blank range (when the target fill the whole screen) you are within the detonation range also so probably you will not fire a missile too often.

If you launch at injector speeds the missile will slow down to normal speed within a second so you have very short time to turn or slow else you will run over and probably ram it.
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Missile malfunction - bug or feature?

Post by Diziet Sma »

Missiles definitely ought not to hit the brakes before firing up their engine. Since this is clearly a bug in core, I'm rather surprised that this thread has gotten to page 3 without a dev weighing in yet...

I'm thinking this thread ought to be moved to Bug Reports, too..
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Missile malfunction - bug or feature?

Post by Norby »

Diziet Sma wrote:
Missiles definitely ought not to hit the brakes before firing up their engine.
So you say the missile should start with zero thrust to avoid brake, then restore thrust after a second when start accelerating. Thanks for the idea, now I changed the fix to use this way in Missile Booster v1.1.
Fritz
---- E L I T E ----
---- E L I T E ----
Posts: 591
Joined: Sun Jul 12, 2015 2:30 pm
Location: Bavaria, Germany
Contact:

Re: Missile malfunction - bug or feature?

Post by Fritz »

I think the root problem is some mixing up of real physics and Oolite physics. With real physics dropping missile without firing the engine wouldn't lead to a relative movement between ship and missile. In case of a failure the missile would just drift in front or below the ship. In Oolite the missile immediately "breaks" to zero speed and then starts to accelerate again. The delay before accelerating (caused by the AI?) makes things worse, but even without this delay the "braking" would cause a collision at any significant speed. The real mystery is why this randomly happened only in most of the cases but not every time!
Diziet Sma wrote:
I'm rather surprised that this thread has gotten to page 3 without a dev weighing in yet...

I'm thinking this thread ought to be moved to Bug Reports, too..
I was wondering why nobody had noticed this obvious problem before since I'm playing Oolite for only two months or so. But I think I know why: People don't usually fly freighters and use them for fighting, but I modified the Python to be something like a battleship. And if an NPC ship has the problem you don't really notice it (I didn't until Anonymissimus mentioned it).

I would move the thread if I could, but it doesn't seem possible for normal members. The topic could/should also be changed because it sounds like the question of a newbie.
"You wouldn't kill me just for a few credits, would you?" – "No, I'll do it just for the fun!"
User avatar
Stormrider
Deadly
Deadly
Posts: 241
Joined: Sat Jan 25, 2014 2:35 am
Location: At work

Re: Missile malfunction - bug or feature?

Post by Stormrider »

Norby wrote:
If you launch at injector speeds the missile will slow down to normal speed
Why do cargo pods travel at ship velocity without slowing down when dropped? They don't even have a drive system, yet a missile which theoretically leaves the ship under its own power slows down after it is far enough away from the ship that the player can see it :? .
A missile should launch at the velocity of the ship then accelerate to the sum of the missile top speed plus ship velocity.
Image
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Missile malfunction - bug or feature?

Post by cim »

Stormrider wrote:
Why do cargo pods travel at ship velocity without slowing down when dropped?
Cargo pods (and mines) don't have engines, so the inertial velocity imparted by being dropped from the ship is uncountered. Missiles have engines, so use them to change velocity to their target velocity on launch. It just happens that the initial target velocity is zero where it should be their maximum speed. That's been the case for a while.

The JS AI code referred to is to deal with the specific case where a missile is fired at a target behind or almost behind the firing ship: what would happen in this case is the missile would sometimes slow to a halt, flip 180, and then accelerate into the firing ship without much effect on the target.

Regarding this bug, there's probably two things which need fixing:
1) The desired speed on launch should be maxspeed, not the default 0 for new entities.
2) A bunch of ships need their missile launch positions looking at and moving to be below the bounding box for the hull (or ships on injectors will probably still ram their own missiles down some of the time)

I've done '1' for tonight's nightly. '2' will need to wait until I have some spare time or someone else provides new positions. (For various reasons, I have little spare time at the moment for Oolite, so things more complex than one-line fixes or straightforward answers are unlikely)
Fritz
---- E L I T E ----
---- E L I T E ----
Posts: 591
Joined: Sun Jul 12, 2015 2:30 pm
Location: Bavaria, Germany
Contact:

Re: Missile malfunction - bug or feature?

Post by Fritz »

The cargo pods do prove that the core software is able to create objects at ship speed.
... then accelerate to the sum of the missile top speed plus ship velocity.
That would violate the laws of relativity! ;)

Most ships are slower than the missiles, so it should be sufficient if the missiles accelerate from the ships (top) speed to their own top speed.
2) A bunch of ships need their missile launch positions looking at and moving to be below the bounding box for the hull (or ships on injectors will probably still ram their own missiles down some of the time)
With Norbys OXP my (fast) Python still has enough time to evade the missile under injector speed. So this probably isn't so important.
"You wouldn't kill me just for a few credits, would you?" – "No, I'll do it just for the fun!"
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Missile malfunction - bug or feature?

Post by Smivs »

Thanks, cim.
I still don't really understand what has changed as this problem does seem to be 'new' - it certainly wasn't happening before.
cim wrote:
2) A bunch of ships need their missile launch positions looking at and moving to be below the bounding box for the hull (or ships on injectors will probably still ram their own missiles down some of the time)
While this may be necessary, I do have some misgivings, mostly that this is going to end up looking a bit dodgy in some cases. Ships like the original/classic BCC (and current Boa Clipper which shares the same hull) for example, with a deep keel. My worry is that say you watch an NPC fire a missile, said missile will appear well below the ship and this could just look a bit weird.
Is it possible to launch the missile on full thrust at the same speed as the ship, have it accelerate away then slow to its true maximum speed? I think this could look more realistic overall despite the fact that it would rely upon Oo-physics over real physics :wink: , and also overcomes the 'bounding box' issue.
Commander Smivs, the friendliest Gourd this side of Riedquat.
Anonymissimus
---- E L I T E ----
---- E L I T E ----
Posts: 299
Joined: Mon Apr 27, 2015 9:03 pm

Re: Missile malfunction - bug or feature?

Post by Anonymissimus »

Stormrider wrote:
A missile should launch at the velocity of the ship then accelerate to the sum of the missile top speed plus ship velocity.
Currently even a slow ship can outrun a missile at injector speed which would no longer be possible if fired at injector speed and the firing ship has faster cruising speed. We don't want that I suppose.
If we're talking about real physics I question why the missile doesn't accelerate to "infinite" speed then, as it applies thrust constantly and there's no friction in space. Same is true for all ships.
warning sound if a missile is inbound: Missile warning
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Missile malfunction - bug or feature?

Post by Norby »

Anonymissimus wrote:
there's no friction in space.
There are some kind of dark matter in Ooniverse which limit the maximal speed of ships. Probably the same medium help to do not fall to planets when stopped above. ;)
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Missile malfunction - bug or feature?

Post by Cody »

Norby wrote:
Anonymissimus wrote:
there's no friction in space.
There are some kind of dark matter in Ooniverse which limit the maximal speed of ships. Probably the same medium help to do not fall to planets when stopped above.
Exactly that...
aegidian wrote:
Oolite - normal space - drives burrow through the semi-rigid phlogiston leaving glowing subspace channels that heal at a constant rate, like hot boiled prunes through icy jelly.
<chortles>
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Missile malfunction - bug or feature?

Post by Smivs »

Cody wrote:
aegidian wrote:
Oolite - normal space - drives burrow through the semi-rigid phlogiston leaving glowing subspace channels that heal at a constant rate, like hot boiled prunes through icy jelly.
<chortles>
Certainly has a way with words, doesn't he?
Commander Smivs, the friendliest Gourd this side of Riedquat.
Anonymissimus
---- E L I T E ----
---- E L I T E ----
Posts: 299
Joined: Mon Apr 27, 2015 9:03 pm

Re: Missile malfunction - bug or feature?

Post by Anonymissimus »

Guard your shyness, human slug-fish ?!

But cargo canisters etc still don't decelerate.

Anyway, my point was that the thing to do is what makes most sense gameplay/balancing wise. Even at cruising speed a fast ship can outrun a missile so-so (it comes nearer but the fuel is consumed in time). Adding the firing ship's speed destroys that.
warning sound if a missile is inbound: Missile warning
Post Reply