Jump to content

Improved physics and KSP engine idea...


theJesuit

Recommended Posts

Hi everyone,

Specifically I want to raise an idea on how to improve physics rates for large craft, multiple craft etc.  I have no idea whether this works with KSP1 engine, or with something like Harmony it may be possible, and whether it would be worth it..

The idea is that craft files are fundamentally changed after some fun playing with UbioWeld.

From what I understand, every part with physics range is being computed which is a LOAD for large craft.

My idea is that craft files are  restructured in a such a way that all node attached parts are automatically 'welded'.  So the game treats them as a singular unit.  A single craft has multiple models, but they are treated as one unit by the game.

The game then assigns ALL the modules/ resources etc that were present in the original parts to the welded ship.  Thrust, COM, etc will all be needed to be taken into account, including how COM would change as fuel is drained out of asymmetric welded crafts.

Surface attached parts give up their modules, but are treated as as vanilla so you may knock-em off.

Craft that have decoloupers/ separators/ docking ports then are then treated the same as they were before.  The thinking is that stages are treated as one part.  So decoupling a two stage rocket doesn't need  a big refactor as the modules and resources  are already assigned to various stage/craft.

Benefit?  Rockets only are bendable at decloupers/ docking ports.

Really have no idea how this would work.  Dammit Jim I'm a config meddler not a coder!  Happy for someone to throw some light, or put it to bed.

 

Peace.

Link to comment
Share on other sites

The big issue is that many parts do not play well with ubioweld. I'm pretty sure @Lisias manages the latest version of the mod, so he can provide more details, but off the top of my head: part variants don't work, moving parts don't work, animations break, etc etc. 

Also, what about part scrapping mods where you destroy parts for supplies/material kits? You would need to destroy the whole vessel.

Re: COM, thrust alignment 

COM could be fixed by having two parts, with masses such that the COM averages out to the correct place. Not sure how that works with in flight mass changes 

Thrust alignment is a matter of transforms, which can move etc in flight, so should be possible with a mod. 

Link to comment
Share on other sites

  On 6/30/2024 at 3:01 AM, theJesuit said:

Benefit?  Rockets only are bendable at decloupers/ docking ports.

Expand  

What downgrades the physics to KSP2 levels.

The whole point of bending is that you are overloading the joints beyound their strength - i.e., you are building a bad designed craft that doesn't respects the limitations of the part.

Without bending, your choices is to just break the joints abruptly without warnings, and let the user scratching their head trying to guess what in hell happened, or you just throw the simulation part of the game trough the Window, dumbing down it - as building a 100 meters flying stick with 1.25 fuel tanks and pretending this is a minimally realistic rocket.

Admission of guilt: UbioWeld does exactly that. :P So much for the game mechanics.. :)

 

  On 7/4/2024 at 6:02 AM, KspNoobUsernameTaken said:

The big issue is that many parts do not play well with ubioweld. I'm pretty sure @Lisias manages the latest version of the mod, so he can provide more details, but off the top of my head: part variants don't work, moving parts don't work, animations break, etc etc.

Expand  

Ubioweld was intended to cut down part count, not to create generic and reusable consolidated subassemblies. So it welds the parts for a craft in a way that it's useful for that craft, without further worries.

Trying to create reusable consolidated subassemblies explodes the complexity of the solution exponentially - because someone would need to code support on the Weld Tool for every possible combination of MODULEs and PARTs.

For example:

  • You are welding 3 parts, each part have 3 possible variants.
    • Currently, the Weld tool just ignores the problem, applying the current selected variant of each part and letting KSP trying to handle the mess.
    • The alternative would be to create a dedicate code that would carefully combine the different VARIANTS into all the possible combinations, or 3 x 3 x 3 = 27 variants.
  • You ware welding 2 stairs. Each stair has a ModuleAnimationGeneric tied do a named mesh from the part's mu file.
    • So you have multiple copies of that meshes, all of them with the same name
    • The ModuleAnimationGeneric doesn't knows how to handle multiple meshes with the same name, the WeldTool would need to find a way to create a new mesh, renamed, and then update the respective ModuleAnimationGeneric.
  • You are welding a stair and a spotlight. Both use ModuleAnimationGeneric but for different purposes (one interpolates a mesh, other a texture)
    • Do you want them to be animated at the same time, or you want to have many toggles, one for each?
    • If you have a stair and 2 spotlights, do you want 3 toggles, or want to consolidate the spotlights into a single one?
      • If you want to animate them separately, you have the duplicated named meshes problem again, and additionally.
  • And I will not even think on talking about the Robotics.

And so goes on. It's a hell of a work for too few gains in exchange - it's easier and more effective to weld the "dumb parts" together, and let the smart ones be operated as single parts normally. The real gains are on welding the dumb parts, as they are - by a mile - in greater numbers.

My suggestion is to combine welded parts with "smart parts" into subassemblies if you need reusability.

Edited by Lisias
Hit "Save" too soon
Link to comment
Share on other sites

Thanks for your replies. @KspNoobUsernameTaken and @Lisias  I've understand about the issues with the welder issue and variants.  In parts that I've made that incorperate a piece with a variant I've cut the variant down to the one that i want in the cfg file.  Nut it still leavss the variant PAW info.  It certainly doesnt work for parts wi variants or even multiple of the same part.

I don't want bendable rockets, but if there was ANY flex then this where it should be.  At sepereting points.

My thought was that for surface attached parts it would leep those as separate.

I didnt think it would be simple, but I'd thought I'd ask anyway.  Thanks again for taking the time to reply.

Peace.

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...