Traffic lights for station docking bays

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

Post Reply
CalebOfIronAssMiner
Above Average
Above Average
Posts: 23
Joined: Mon Oct 12, 2020 8:44 am
Location: Slovakia

Traffic lights for station docking bays

Post by CalebOfIronAssMiner »

Hello. Imagine you play with stations not requiring docking clearances. Or you do have that turned on but are docking on a station without this protocol (Superhub, anyone?).

You line up with the docking port, get to about 0.25 km distance from it and then an Anaconda launches right into your face and ... kaboom, press Space, Commander.

And there is no way to tell this is about to happen, right until the moment it actually happens.

I don't understand why in the frakking Ooniverse, when the year is 31xx, nobody in there got that simple idea of a traffic light, when our humble tech -1000 planet is already using them.

Look into the docking bay. See that flashing quartet of yellow lights. Why not use them for signalling and very basic docking permission granting?

The idea is that the lights will change colors:

Green light: Dock any time you wish, in any order you wish. Just make sure that you don't hit other Commanders and try not to be rude and swing into the base 0.1 km in front of their nose.

Quaret of yellow lights: A ship is going to launch soon but you are still safe to dock. You may want to speed up a little bit. This shall show up two minutes before the "Two yellow lights alternating" state.

Two yellow lights alternating: The red light is going to show up in less than 10 seconds. Consider aborting your approach unless you already are halfway through in the port (in that case throttle up to get in immediately).

Red light: Ships cleared for launch. No docking allowed. If you dock at this time, bounty will be applied for "public endangerment". If someone gets killed because of your irresponsible actions, you will also be charged for "killing by negligence", becoming a fugitive. Provided you won't get smashed to pieces by that Anaconda.

There should also be lights around the docking bay repeating this information, so commanders don't have to line up with the docking bay, obstructing the approach lane to see the signal. In that case I would suggest "green", "yellow" (for both, the "yellow quartet" and the "two yellow lights alternating" states in the docking bay), and "red" (indicating ships being launched). The idea is that if you are at an angle unable to see the back wall of the docking bay and the lights around it are yellow and you don't know when that yellow actually switched from green, you should wait for the green. If you saw the transition, you know that you have 2 minutes to complete the approach.

This would also allow high-traffic areas to avoid the inevitable traffic jams caused by the rigorous docking clearance protocol while providing basic safety precautions.
User avatar
Nite Owl
---- E L I T E ----
---- E L I T E ----
Posts: 556
Joined: Sat Jan 20, 2018 4:08 pm
Location: In The Dark

Re: Traffic lights for station docking bays

Post by Nite Owl »

This post is going to be a series of links pointing you in the right directions to achieve what you want.

TRAFFIC LIGHTS are only for main stations but they do what you ask along with a few other things. See also NEO-DOCKLIGHTS and I.L.S. for OXZs with similar yet distinctive behavior.

There is no easy way to avoid the occasional smashing into of a departing ship unless you do have the Docking Clearance Protocols set to YES for just about every station. In my Ooniverse they are ON for everything except Rock Hermits in order to avoid this dilemma. However, it is your Ooniverse we are discussing so the choices are yours to make. Consider the following if you do wish to avoid these smashing, Press Space Bar causing, incidents. OOLITE DOCKING CLEARANCE PROTOCOL just about sums up everything you would need to know regarding docking protocols. You should also have a look at SHIPDATA.PLIST REQUIRES_DOCKING_CLEARANCE to better understand how this works on the level of an individual station.

The only other point to be made is that a bookmarked OOLITE WIKI is your friend. Searching it for what you are looking for is a thing of beauty to be learned. Searching the forums is a good idea as well. Almost everything you might need to know about Oolite can be found by a decent search of those two places.

Fly Safe and Dock Straight Commander, and hopefully no more smashing into departing Anacondas.
Humor is the second most subjective thing on the planet

Brevity is the soul of wit and vulgarity is wit's downfall

Good Night and Good Luck - Read You Soon
User avatar
stranger
---- E L I T E ----
---- E L I T E ----
Posts: 351
Joined: Thu Apr 05, 2018 5:31 am
Location: Vladivostok, Russia

Re: Traffic lights for station docking bays

Post by stranger »

Departing ships NOT exists as entities before launch event. Honestly, I don't know is it possible to predict launch event using JavaScript - it is beyond my coding knowledge. So the best way to avoid collisions - always to call docking clearance if it is allowed. Having granted docking clearance you'll never get sudden launch of Annie on collision course. Sometimes there are emergency situations than your docking clearance will be terminated to launch patrol Vipers, but you have several seconds before launch to abort approach or to finish if you are already in docking bay.
CalebOfIronAssMiner
Above Average
Above Average
Posts: 23
Joined: Mon Oct 12, 2020 8:44 am
Location: Slovakia

Re: Traffic lights for station docking bays

Post by CalebOfIronAssMiner »

This post is going to be a series of links pointing you in the right directions to achieve what you want.
Thanks. This should shave some weeks off my search. Still need to learn how to code an OXP, though. :D

Right now I am just doing some little tweaks here and there, like hacking my Ore Processor to make it possible to crunch through all the Common Minerals with the Gold, Platinum and Gem-Stones while leaving Alloys and Radioactives in their unprocessed mineral form so I can pawn them off to whoever has a mining contract signed with me.

Getting to making my own OXP is going to take some time.
There is no easy way to avoid the occasional smashing into of a departing ship unless you do have the Docking Clearance Protocols set to YES
Rock hermits in my ooniverse transmit a message like "it is not a good idea to try docking now" or "please stand by while we send someone out" some 5 seconds before launching a ship. That is enough for me to avoid smashing into a miner when docking with a rock hermit. Yes, it happened a few times, once I was already in the mouth of the rock hermit, inching towards the bay (I just hit the accelerator to finish the docking immediately) and two or three times when very close (was able to get out of the way in time).

On the other hand main stations tend to suddenly launch ships when their docking clearance protocol is OFF, with no prior indication given to anyone trying to dock.

This is the behavior that seems pretty unrealistic to me - here on Earth we (usually) don't "launch" cars onto streets without some sort of indication to the cars already on the streets that we are about to "launch a car".

Yes, sometimes there might be some rowdy that plows himself into oncoming traffic but in my 40+ years of existence here I have yet to see this in person. However in the first 2 months of my "ooxistence" I managed to turn from Harmless to Mostly Harmless by the station smashing a Sidewinder into me on two occasions (and a Mamba too, I think). Luckily no Anacondas, though.

Now, main stations in my ooniverse don't do that anymore as they have docking clearance protocols in force now. I was just thinking (based on my experience with Rock Hermits), maybe the docking clearance protocol is an overkill - a simple traffic light could do the trick.
Honestly, I don't know is it possible to predict launch event using JavaScript - it is beyond my coding knowledge.
Well, in my ooniverse I have this nifty "Traffic control OXPs" that adds launch queues to stations. So, coding in some sensible "traffic lights behavior" for the traffic lights on the station (in the docking bay for example) could be easy with this facility available. Need to have a look if other OXPs can access that list.
Post Reply