Page 3 of 4
Re: Missile malfunction - bug or feature?
Posted: Tue Sep 22, 2015 3:54 pm
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.
Re: Missile malfunction - bug or feature?
Posted: Tue Sep 22, 2015 4:07 pm
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...
Re: Missile malfunction - bug or feature?
Posted: Tue Sep 22, 2015 5:53 pm
by Norby
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.
Re: Missile malfunction - bug or feature?
Posted: Wed Sep 23, 2015 3:20 am
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..
Re: Missile malfunction - bug or feature?
Posted: Wed Sep 23, 2015 9:23 am
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.
Re: Missile malfunction - bug or feature?
Posted: Wed Sep 23, 2015 12:21 pm
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.
Re: Missile malfunction - bug or feature?
Posted: Wed Sep 23, 2015 3:02 pm
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.
Re: Missile malfunction - bug or feature?
Posted: Wed Sep 23, 2015 4:10 pm
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)
Re: Missile malfunction - bug or feature?
Posted: Wed Sep 23, 2015 6:19 pm
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.
Re: Missile malfunction - bug or feature?
Posted: Wed Sep 23, 2015 6:30 pm
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
, and also overcomes the 'bounding box' issue.
Re: Missile malfunction - bug or feature?
Posted: Wed Sep 23, 2015 6:47 pm
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.
Re: Missile malfunction - bug or feature?
Posted: Wed Sep 23, 2015 7:26 pm
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.
Re: Missile malfunction - bug or feature?
Posted: Wed Sep 23, 2015 7:35 pm
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>
Re: Missile malfunction - bug or feature?
Posted: Wed Sep 23, 2015 7:38 pm
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?
Re: Missile malfunction - bug or feature?
Posted: Wed Sep 23, 2015 7:47 pm
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.