Jump to content

One docking port, disconnected vessels, two+ docking ports connected


Recommended Posts

I was thinking about version 1.1 and independently threaded ships and thinking, it would be great to have a nice ship and a nice station, but when you dock they become one, and you become subject to the single physics thread bad person. So my idea was why can't two craft docked by only a single docking port remain two vessels, physics wise. If you dock two or more docking ports together you are trying to build a single craft. In my head I can see a different type of joint that does not simulate torque and other physics calculations, is easily breakable, but just allows transfer of resources and Kerbals.

I know there will be lots of people who will bring up cases where they want to dock two craft with a single docking port and become one, but, think of the advantages, a proper space port with multiple ships docked? A single docking port is a poor physical  connection between craft anyway, and I would always connect multiple, I have seen many stock and modded solutions to the weakness of docking port joins.

i know there are issues, especially calculating movement change between vessels and torque from one affecting another, I guess I am thinking a super sloppy linkage, maybe magnetic force only? that breaks at the least provocation, its physics is very simply simulated and if timewarp or scene changes happen the vessels are actually separated.

Link to comment
Share on other sites

I imagine the main reason for it, as with many other things in KSP, is done for saving peoples' FPS. Games get clogged up by just calculating for debris, and you don't even have to be looking at said debris for it to have an effect. Imagine calculating multiple different ships, all of which have higher part counts and such. Docking together to join them makes them all one part. Flimsy, yes, but there are mods to stabilize it. 

Certainly don't quote me on the game mechanics, I've got no idea. It's just what I can figure from conjecture.

Link to comment
Share on other sites

16 hours ago, Maximus97 said:

I imagine the main reason for it, as with many other things in KSP, is done for saving peoples' FPS. Games get clogged up by just calculating for debris, and you don't even have to be looking at said debris for it to have an effect. Imagine calculating multiple different ships, all of which have higher part counts and such. Docking together to join them makes them all one part. Flimsy, yes, but there are mods to stabilize it. 

Certainly don't quote me on the game mechanics, I've got no idea. It's just what I can figure from conjecture.

That's just it though, currently it doesn't matter the more parts and vessels in physics range the worse your game runs because the physics thread is single threaded, in 1.1 it is going to be multi threaded, so each vessel will have its own thread. So having lots of ships in physics range won't lag the game like it currently does. However start docking those vessels together and you will be pushing it all into one thread again and the lag will start. I am just proposing some thought goes into a docking method that does not require actually creating one craft from two docked craft, and that they maintain there own separate physics thread.

Link to comment
Share on other sites

If it can be done then great.

But the very nature of docking (both IRL and in game) means that the two vessels become joined, and any movement by one will have an effect on the other so it may well not be possible to treat them as separate ships on individual threads.

Link to comment
Share on other sites

11 hours ago, pandaman said:

If it can be done then great.

But the very nature of docking (both IRL and in game) means that the two vessels become joined, and any movement by one will have an effect on the other so it may well not be possible to treat them as separate ships on individual threads.

This is true, but how well does it need to be simulated, maybe the docking joint could run it's own little thread and just pass values to the two other threads. It would probably be sloppy as heck and the joint would react slowly, but I would sacrifice this for having a great station and a nice craft docked for transfer in orbit.

Link to comment
Share on other sites

Multiple ships in the same physics bubble affect each other right now anyway, what happens when you bump into a piece of debris with your active vessel? It explodes or gets nudged out of the way.

If two vessels are docked, it only means they are in some way constrained together when it comes to movement, but can still be calculated as being two different vessels (just like in real life). Right now, KSP recalculates the part tree when a vessel docks or undocks, which poses its own set of specific problems, most notably with the root part changing causing controls to go haywire.

Link to comment
Share on other sites

5 hours ago, Stoney3K said:

Multiple ships in the same physics bubble affect each other right now anyway, what happens when you bump into a piece of debris with your active vessel? It explodes or gets nudged out of the way.

If two vessels are docked, it only means they are in some way constrained together when it comes to movement, but can still be calculated as being two different vessels (just like in real life). Right now, KSP recalculates the part tree when a vessel docks or undocks, which poses its own set of specific problems, most notably with the root part changing causing controls to go haywire.

They won't be such a burden in 1.1 because even though their movement needs to be calculated each part tree can be in a different thread, You could break this problem up into many threads, but once you dock and create one craft, and the part tree is recalculated that all must be in a single thread and then you lose performance. If however you could break the problem into three threads by keeping the part trees separate your performance would not suffer as much. You would not be able to say, tow a cart this way, the simulation would be too sloppy, I would suggest the connection severs if any large movement happens and then they are all separate again, otherwise you would have springy rope type behaviour.

Link to comment
Share on other sites

On 9-3-2016 at 0:14 AM, selfish_meme said:

You would not be able to say, tow a cart this way, the simulation would be too sloppy, I would suggest the connection severs if any large movement happens and then they are all separate again, otherwise you would have springy rope type behaviour.

I suspect that towing a cart through docking ports will work *better* with a mechanism like that. Right now, when docking ports are docked, their connection is rigid no matter what happens, with no force being strong enough to tear the two docked pieces apart without ripping the docking port off first. That's not how real docking ports work.

Sure, when a hard dock is achieved there will be limited room for movement, but this is normal since a real spacecraft also needs to take care not to apply any huge forces which may tear the docked combination apart. You can also put a technical spin on it like saying the port has a built-in safety mechanism that undocks or reverts to soft dock if any of the forces on the port are too big to prevent the port(s) from being torn off the ship.

Using KAS you can already connect up or tow two separate vessels which *remain* separate. The only KAS part that acts as a docking port is the fuel line, and even that is flexible.

Link to comment
Share on other sites

The problem is that forces can still translate and feed-back through the docking ports, and that's what prevent them from being on different cores.

For example, imagine you have a big space station, and a tiny capsule, connected to the station by a docking port. Now, take another ship, and ram the tiny capsule. The physics engine must not only calculate how hard the capsule pushes back against your ramming ship, it has to calculate how hard the entire station pushes back. The mass of the station, not to mention how it's configured, all factor into the "pushing back" factor - if said docking port is on the end of a flexible 'arm' of the station, it won't push back as hard as if it's in the central area of a solid, rigid station.

That "pushing back" calculation is nearly impossible to split into threads, and it has to be calculated a lot, even for non-ramming purposes. That's probably the main reason for not being able to split it into different sections.

Some games (I think Space Engineers does this?) get around this sort of thing by having the core of the station be 'static' - it doesn't flex and doesn't move no matter how hard it's pushed. So when the 'pushing back' calculation reaches a static part, it can stop, and doesn't have to care about anything that's connected beyond that part. Thus, each connected part that is physics-simulated counts as its own independent vessel, and can be simulated on a different thread. Possibly, in a future update to the game, the rails physics might be updated to simulate the station core itself and make it static, under certain conditions (e.g. it's not rotating, it has enough solid rigid parts that it wouldn't flex, etc) - but such a system would be prone to its own bugs and problems unless extremely carefully handled, so it might be kind of a long shot.

Edited by StarManta
Link to comment
Share on other sites

Forget docking ports. This sounds like the plastic inflated transfer tube concept that I think some sci fi uses.

I guess I'm convinced. You'd get the two separate ships within say 20m and their transfer tube ports facing each other. You click the "extend transfer tube" button, and an initial calculation is done somewhere to establish whether they're close enough for the link to be established. If so, then the game starts rendering a long floppy connector that clearly has no ability to withstand significant forces, and a flag is set in each craft so that they re-check the connection on each of their physics passes from that point onward to see whether the tube has ripped in half. As long as it's still there, you have access to menu options to move crew and fuel between the separate crafts. Sounds a bit too future-tech for stock, but I can imagine it in a mod.

Link to comment
Share on other sites

4 hours ago, HebaruSan said:

Forget docking ports. This sounds like the plastic inflated transfer tube concept that I think some sci fi uses.

I guess I'm convinced. You'd get the two separate ships within say 20m and their transfer tube ports facing each other. You click the "extend transfer tube" button, and an initial calculation is done somewhere to establish whether they're close enough for the link to be established. If so, then the game starts rendering a long floppy connector that clearly has no ability to withstand significant forces, and a flag is set in each craft so that they re-check the connection on each of their physics passes from that point onward to see whether the tube has ripped in half. As long as it's still there, you have access to menu options to move crew and fuel between the separate crafts. Sounds a bit too future-tech for stock, but I can imagine it in a mod.

This is exactly what I am thinking without the tube. You would not need to calculate force transfer through the connection above the ship is moving at more than .2ms or something then the connection is severed.

Link to comment
Share on other sites

The flexible tube idea could be a possibility.  For stuff in space I imagine it would be deployed temporarily while you transfer stuff. Then retracted to prevent damage, possibly automatically if neither vessel is focused. 

 

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...