Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Core and OXP ships with docking problems

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Core and OXP ships with docking problems

Post by Diziet Sma »

This afternoon I had the "pleasure" of sitting in a docking queue for around 45 minutes, (my position was 17 when I began) and this gave me the opportunity to observe a few problems with the docking code.

Most NPC ships, core or OXP, are fine, they may fumble once in a while, but generally get themselves sorted out. A few OXP ships, however, appear to be congenitally incapable of docking. So far as I can tell, it seems to afflict mostly the more high-performance ships.

They will fiddle and fuss about, never satisfied with their approach, and will abort, go around, and try again, 6 to 10 times or more, before (once in a while) getting it right, or (more usually) crashing into the station.

The biggest offenders in this regard are the Orion and the Aquatics Manta Ray and Barracuda, particularly the Police variants. The most relevant factors seem to be a combination of high speed and high thrust, with pitch and roll sometimes playing a role too, although perhaps to a lesser extent:

Code: Select all

Orion:
	max_flight_pitch = 2.6;
	max_flight_roll = 2.8;
	max_flight_speed = 375;
	thrust = 65;

Manta Ray Police:
		max_flight_pitch = 1.4;
		max_flight_roll = 2.4;
		max_flight_speed = 400;
		thrust = 40;

Barracuda Police:
		max_flight_pitch = 3.0;
		max_flight_roll = 4.0;
		max_flight_speed = 450;
		thrust = 100;
Fully half the time I sat watching was taken up by a flight of 4 GalCop Manta Rays attempting to dock. One after the other, they'd try, abort, fart around for a while in a protracted go-around, then try again, each time getting a little closer to the station before aborting once again. Three of them eventually got into the slot before aborting yet again.. they managed some kind of gymnastic feat and actually flew back out of the dock, did another go-around, and tried once more. Of the four, only one actually managed to eventually get into the station. The others all died.

Pretty much every time I encounter a large backlog of ships waiting to dock, it's due to one or more of the above ships being unable to get their act together. I'm guessing that all these ships are so "twitchy" that they're constantly overshooting the point they're trying to align themselves with.

Ideally, the docking code needs to be able to somehow better limit the thrust and twitchyness of ships when performing docking manoeuvres, or else 3 failed attempts in a row gets them sent to the back of the queue so that everyone else gets a chance to dock.

In the meantime, I'm pulling these two OXPs from my game, because it's just so painful to watch. It's a good thing I'm currently in an Adder with a popgun, because the temptation to just blow them away is almost irresistible.


Edit: Thread title updated to better reflect the situation.
Last edited by Diziet Sma on Tue Jul 08, 2014 10:16 am, edited 2 times in total.
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
Neelix
---- E L I T E ----
---- E L I T E ----
Posts: 288
Joined: Sat May 31, 2014 9:02 pm
Location: Melbourne, Australia

Re: OXP ships with docking problems

Post by Neelix »

I don't have any ship OXPs installed but I was noticing exactly the same thing with the GalCop Viper Interceptors today while pissfarting around with the debug console...

I was telling Switeck about it on IRC:
<Neelix> What is it with these viper Interceptors being unable to dock?
<Switeck> buggy probably :(
<Neelix> I'm sitting where I can observer the docking lane of Ceesxe... The traffic waiting to dock is really backed up... I see a Viper Interceptor just flying around in front of the station in the docking lane and it keeps at it...
<Neelix> I made it explode via the console, and another took its place
<Neelix> After I'd made about 5 Interceptors explode, A python came in to dock - docked successfully
<Neelix> now there's another Interceptor there and it's doing the same thing
- Neelix
Talaxian Enterprises: [wiki]Vacuum Pump[/wiki] [wiki]Waypoint Here[/wiki]
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: OXP ships with docking problems

Post by Diziet Sma »

Neelix wrote:
I was noticing exactly the same thing with the GalCop Viper Interceptors today
And we have:

Code: Select all

Viper Interceptor:
		max_flight_pitch = 2;
		max_flight_roll = 4.2;
		max_flight_speed = 520;
		thrust = 50;
There would appear to be a pattern developing, methinks..
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
Neelix
---- E L I T E ----
---- E L I T E ----
Posts: 288
Joined: Sat May 31, 2014 9:02 pm
Location: Melbourne, Australia

Re: OXP ships with docking problems

Post by Neelix »

I guess someone needs to teach the pilots of these high powered NPC ships how to configure their joystick profiles... ;-)

- Neelix
Talaxian Enterprises: [wiki]Vacuum Pump[/wiki] [wiki]Waypoint Here[/wiki]
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: OXP ships with docking problems

Post by Diziet Sma »

Or to at least be a LOT more gentle with the throttle..
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
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6883
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Re: OXP ships with docking problems

Post by Disembodied »

I wonder if it would be worthwhile (or indeed possible) to give NPCs a set of "docking mode" ship stats?
Neelix
---- E L I T E ----
---- E L I T E ----
Posts: 288
Joined: Sat May 31, 2014 9:02 pm
Location: Melbourne, Australia

Re: OXP ships with docking problems

Post by Neelix »

If it helps any, I decided to check the docking instructions for the Viper Interceptor currently looping around like a drunkard in the docking lane of Ceesxe:

Code: Select all

> player.ship.target.dockingInstructions
{
    docking_stage: 3,
    ai_message: "APPROACH_COORDINATES",
    match_rotation: 0,
    speed: 128,
    destination: {
        x: -50332.89221527233,
        y: 57693.45990912534,
        z: 438650.1824083581
    },
    range: 15,
    station: [Station "Dodecahedron Station" "Dodecahedron Station" position: (-52580.2, 59890.4, 437581) scanClass: CLASS_STATION status: STATUS_ACTIVE]
}
> player.ship.target.AIScript
[Script "Oolite Police AI" version 1.81]
> player.ship.target.dockingInstructions
{
    docking_stage: 3,
    ai_message: "APPROACH_COORDINATES",
    match_rotation: 0,
    speed: 128,
    destination: {
        x: -50332.89239710445,
        y: 57693.456018337565,
        z: 438650.1747781865
    },
    range: 15,
    station: [Station "Dodecahedron Station" "Dodecahedron Station" position: (-52580.2, 59890.4, 437581) scanClass: CLASS_STATION status: STATUS_ACTIVE]
}
I don't know how useful that is but hopefully it provides a pointer as to where things are breaking down...

- Neelix


Edit: FWIW I also checked the GC VI's speed several times with "player.ship.target.speed" - it never exceeded 128.
Talaxian Enterprises: [wiki]Vacuum Pump[/wiki] [wiki]Waypoint Here[/wiki]
User avatar
aegidian
Master and Commander
Master and Commander
Posts: 1160
Joined: Thu May 20, 2004 10:46 pm
Location: London UK
Contact:

Re: OXP ships with docking problems

Post by aegidian »

Disembodied wrote:
I wonder if it would be worthwhile (or indeed possible) to give NPCs a set of "docking mode" ship stats?
That's probably a good, simple way to handle it. The simplest approach would be to have something like...

Code: Select all

    docking_speed_modifier = 0.5
Alternatively the docking behaviour could be cleverer and self-check, limiting the target velocities as necessary.
"The planet Rear is scourged by well-intentioned OXZs."

Oolite models and gear? click here!
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: OXP ships with docking problems

Post by Diziet Sma »

Neelix wrote:
Edit: FWIW I also checked the GC VI's speed several times with "player.ship.target.speed" - it never exceeded 128.
I'm not entirely convinced it's speed alone that's the problem.. there's also the acceleration rate, which is to say, "thrust".. the ships may just be accelerating so fast that they can't pull up on the spot they're aiming for.
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
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Core and OXP ships with docking problems

Post by cim »

Thrust is also the deceleration rate, so they should also be able to stop sooner, but it's possible that isn't good enough with the frame rate. Certainly it would be straightforward if a particular parameter was identified as making it difficult to dock to artificially limit it in the docking AIs. I'll do some experimentation when I get a moment.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Core and OXP ships with docking problems

Post by cim »

Okay, I think there's a fix in 0124b6d. If you're seeing these problems in 1.80, try tonight's nightly build and see if you get the same results. (Note that we are now very definitely in the "breaking things" part of the release cycle, so if you aren't already testing the nightlies, going back to 1.80 afterwards is recommended)

It doesn't appear to be related to the thrust value, except that high thrust ships tend to also have high speed. It's the high speed combined with high roll/pitch that does it. (High thrust actually mitigates it a bit, but nowhere near enough)

The crashing into the station is a slightly different bug which causes them to try to BACK_OFF from the station by going through the station. Also fixed now, I think.
Neelix
---- E L I T E ----
---- E L I T E ----
Posts: 288
Joined: Sat May 31, 2014 9:02 pm
Location: Melbourne, Australia

Re: Core and OXP ships with docking problems

Post by Neelix »

I'd say something went wrong... :roll:

Loaded the new build
Launched from Ceesxe - Aegis practically deserted... hrm... need to liven it up a bit...
Picked an innocent Transporter as my victim and called player.ship.target.dealEnergyDamage(50,10000,0.25)
Sure enough several Viper Interceptors launched shortly afterwards...
... and promptly splashed themselves on the Nav beacon! :lol:

- Neelix
Talaxian Enterprises: [wiki]Vacuum Pump[/wiki] [wiki]Waypoint Here[/wiki]
Neelix
---- E L I T E ----
---- E L I T E ----
Posts: 288
Joined: Sat May 31, 2014 9:02 pm
Location: Melbourne, Australia

Re: Core and OXP ships with docking problems

Post by Neelix »

Neelix wrote:
I'd say something went wrong... :roll:

Loaded the new build
Launched from Ceesxe - Aegis practically deserted... hrm... need to liven it up a bit...
Picked an innocent Transporter as my victim and called player.ship.target.dealEnergyDamage(50,10000,0.25)
Sure enough several Viper Interceptors launched shortly afterwards...
... and promptly splashed themselves on the Nav beacon! :lol:

- Neelix

ok maybe that was more to do with the fact that the transporter I picked on was close to being inline with the nav beacon... still some thing to look at perhaps but probably unrelated. I reloaded my saved game and waited for a squadron of VI's to launch on their own, and they cleared the docking lane normally.

Incidentally is there any good reason to disallow *loading* a saved game while in space?


EDIT: aha Spotted a VI trying to dock - seems to be stuck at stage 4 of the docking sequence - same issue as before.

EDIT2: I've been silly haven't I... *checks timestamps* I saw your message when I woke up and assumed another build had been uploaded in the meantime but now I'm not so sure... I updated from 1.81.0.5843-140707-4f4edaa to 1.81.0.5848-140708-3421f75 but I'm not sure if that includes the fix or not.
Talaxian Enterprises: [wiki]Vacuum Pump[/wiki] [wiki]Waypoint Here[/wiki]
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Core and OXP ships with docking problems

Post by Diziet Sma »

Neelix wrote:
EDIT2: I've been silly haven't I... *checks timestamps* I saw your message when I woke up and assumed another build had been uploaded in the meantime but now I'm not so sure... I updated from 1.81.0.5843-140707-4f4edaa to 1.81.0.5848-140708-3421f75 but I'm not sure if that includes the fix or not.
Yup.. 3421f75 is the last build before the fix went in.. the new nightly is not yet online.. but shouldn't be too much longer now.
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
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Core and OXP ships with docking problems

Post by Diziet Sma »

cim wrote:
The crashing into the station is a slightly different bug which causes them to try to BACK_OFF from the station by going through the station. Also fixed now, I think.
So no more entertaining suicides and wrecks? Bummer.. have you ever seen a Fugu Tanker smash into a station? Spectacular! :twisted:

Seriously though.. good job, if fixed.. the death toll at most stations is starting to rival the Thargoids, for kill-count.
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
Post Reply