Jump to content

Ksp need to fix the performance


Luc1fer

Recommended Posts

6 hours ago, Brikoleur said:

There are other simplifications/optimisations they could do, which would affect the accuracy of the simulation but I think would have negligible gameplay effects. For example, they could group parts into units which are then treated as a single object in terms of physics. Candidates would include payloads inside fairings, wing surfaces, and stacks of small parts.

For example, they could make it so that a stack or a wing surface always has 1-4 parts. Any parts above that are merged into larger parts. The components making up the group determine the thermal and physical stress thresholds for it. If exceeded, it flies apart from random locations in a big kaboom.

This wouldn't be as accurate as the current simulation, but I think in practice the results would be close enough that most of the time you wouldn't notice any difference (and when you would, it would be an improvement -- big wing surfaces wouldn't flap around like they do now unless autostrutted, and noodle rockets would be somewhat less noodly). 

This approach should address the scaling problem, as it would cap the number of parts used in the physics calculations, regardless of what went into the ship.

If they were feeling nice about it, they could even give players a measure of control over which parts make a group.

Considering the utterly strange geometries KSP players come up with, I'm not so confident that it would be an easy task to do automatic parts welding in a coherent way that doesn't create giant exploits.

For example, your suggestion about welding a wing together? Might work great for a sensible wing design like a delta wing. Not so if somebody decides the middle of the wing should be very narrow. Without parts welding, that narrow section would be a weak point liable to snap in a turn. With parts welding, that weak section is... not.

One of the neat things about the current implementation is that it's reasonably good at treating not only ordinary geometries, but also any insane contraption players come up with. While parts welding would fix some issues like noodly rockets, that should really be addressed by giving part linkages more realistic rigidity.

 

52 minutes ago, Dafni said:

Hmm, interesting. Makes you wonder why they picked that engine in the first place. Are there better alternatives at all then??

It was cheap, and had a fully functioning rigid-body physics engine. Some of the paid alternatives have "better performance", by which they mean "more ways to optimize graphics calls", which doesn't help for rigid-body physics at all.

I don't know offhand of any engines with a significantly higher-performance, well-tested rigid-body physics engine, which is likely at least in part because not many games need it. Most games don't need to handle assemblies of hundreds of linked parts: KSP is very much an exception in that regard.

Link to comment
Share on other sites

2 minutes ago, Starman4308 said:

Considering the utterly strange geometries KSP players come up with, I'm not so confident that it would be an easy task to do automatic parts welding in a coherent way that doesn't create giant exploits.

For example, your suggestion about welding a wing together? Might work great for a sensible wing design like a delta wing. Not so if somebody decides the middle of the wing should be very narrow. Without parts welding, that narrow section would be a weak point liable to snap in a turn. With parts welding, that weak section is... not.

Autostrut already does that.

The welding algorithm would have to be moderately complex but a few very common cases could likely be handled very easily:

  • stacks -- obviously simple; beams snapped to node would also be treated as stacks
  • surface attached tanks -- could usually be welded onto the parent
  • anything inside a fairing, cargo bay, or utility bay

Things that would be a little harder but probably not that hard:

  • Wings. To create a grouping, you'd want to look at how many wing surface children any wing surface has, and where they're attached. If, say, it has at least three and they're all on different edges, that would be a candidate group. 

I think that a sensible welding algorithm for just these four cases could cut the physics part counts for large craft by as much as a factor of ten without noticeably affecting how the game plays. 

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