pioneerspacesim / pioneer

A game of lonely space adventure
https://pioneerspacesim.net
1.64k stars 379 forks source link

Allow ship-to-ship docking in space #3071

Open impaktor opened 10 years ago

impaktor commented 10 years ago

Nothing super fancy, "just" match speed and direction, and then put them relatively close to each other. @nozmajner tells me all the Mandarava-Csepel ships have docking ports on them, so that's an added bonus.

Once that is in place, it could be used for such things as:

I imagine this could allow docking with some sort of pirate bulk ship in deep space where you could trade slaves, loot, and illegal goods, or you might get boarded by pirates.

Well, it's all up to the mission scripters really, if we get something into the game.

What is needed

this is a split from #3069

bszlrd commented 10 years ago

From modeling POV:

Using tag to indicate docking port? Similarly to camera and weapons tags. Z could be the outwards direction, (pointing in the opposite direction when they are at the same location), and the X or Y could be a rot alignment direction for it.

I just double checked the ships with docking ports, and some of them are too close to the ship surface to be actually usable. It might be useful to have an animation which extends the connector, kind of like an APAS or something to allow more space between ships. http://en.wikipedia.org/wiki/Androgynous_Peripheral_Attach_System

Some ships in docking alignments: Malabars need to rotate around mostly because the front turrets: dock

Or use the side ports: dock6

Kanaras need to be rotated, and some clearance is needed mostly because of the wings: dock1

Kanara-Malabar needs rotation and port sizes are mismatched: dock2

Varada has a quite small port (about shoulder width, mostly there for emergencies and such, when the opening cockpit cannot be used.): dock3

Some other possible combinations currently: dock5

All ports in comparison: dock7 Malabars rear port is intended for station and maintenance stuff, and it doesn't have much clearance because the heat sink fins. Those fins are rotatable though, so it could be solved with an animation.

Dock ring size limitations might be useful too. These port sizes I modeled on ships are quite different. Maybe it's not that problematic, I can imagine flexible ports in the future at least in between some reasonable limits. Or just adjust the existing ports to predefined sizes.

Adding a port to OPLI ships shouldn't be too problematic, mostly a question of texturing, and adding the extending part if you guys decide to implement that too. Deneb also seems relatively straightforward with a port on the top or bottom. Or on the front under some hood maybe. Venturestar is easier with it's flat top. DSMiner should also have a proper place for it. Wave is similar to Deneb in this regard, top or bottom port. All MCS ships have ports. Kaluri ships have them too, but only on texture, but should be relatively simple to add any extending part.

Both these points could be a requirement for new ships if this gets implemented. I tend to include them because it's a good opportunity for meaningful detail anyway.

The alignments could be problematic though. Maybe there could be a list that has the needed alignment for each combination (one rotation value and maybe a distance should be enough ). And to aid filling that list, a function in the Model viewer which can dock any ship to the current one, and a bar to adjust these values to find a good alignment. (could load them from the list by default). This might be a hassle when we have a lot of ships though. Maybe the model viewer could also update these values.

Edit: external docking could work for smaller stations too, which don't have actual landing pads. I'm planning to make a bulk ship, and when it's ready, I want to make a version from it which is re-purposed to be a small station, and external docking would be nice for that.

arcadia-xenos commented 10 years ago

This would be phenomenal. I'm very for it. Even if the physical docking has to be abandoned or postponed as WIP for some time in favor of a less tricky method in the interim, it will be worth it. Oh so worth it.

I have to ask, will this be something like each ship being it's own dock? Having it's own forms of trade / comms, etc? Will ships be able to hail the player as he passes by? Will the systems maps detail the number of dockable targets? Also, will this advance the cargo scooping / cargo body mechanics?

Omg, I'm excited!

bszlrd commented 7 years ago

From today's IRC conversation on this topic regarding different collar sizes: apases This International Docking System Standard like layout of three petals placed at 120° could provide means to attach different sizes of collars. In a flimsy way only, so you would need some kind of inflatable temporar tunnel between ships, and towing is out of question, but for simply transferring stuff this might be sufficient.