Jump to content

Is a physics engine rework planned?


Recommended Posts

Question in title. KSP's engine seems to be poorly optimized, with the biggest issue being that physics are calculated on a per-frame basis, leading to extreme floating point errors with low FPS or high time warp (AKA Kraken attacks). Plus there is no way to accelerate multiple objects due to a limitation of the physics engine. Has Squad acknowledged this in the past? It seems to be the biggest issue holding KSP back from being so much better and limiting the capabilities of mods.

Link to comment
Share on other sites

Ultimately we're dependent on Unity. I don't think KSP 1 would switch to a different engine, that will be too much work for Squad. Maybe KSP 2 could use a custom engine better suited to physics on solar-system scales.

Link to comment
Share on other sites

Squad are at the forefront of heavy physics use in Unity. I feel that it's one of the bigger things Unity are working on, and Unity 5 is promising massive improvements.

Also, i don't think your understanding of the way physics is calculated is quite correct.

Link to comment
Share on other sites

I doubt much will be happen. Imo the engine works quite fine outside the performance. And that's because Unity still uses the old crappy physX version Nvidia used to push their chips. The multicore-capable version of physX will come with Unity 5, which might take a half year or more until it's release.

Edited by Temeter
Link to comment
Share on other sites

There's two types of physics going on in KSP.

The first is orbital mechanics where we compute the orbital parameters of a ship and its course, these are where the floating point errors cause trouble. Performance wise this part is fairly trivial, even the slowest of PCs can easily keep up with it until you get absurd numbers of things in orbit.

The second is part interaction physics, where the various parts in a ship interact with each other, other bodies, and the forces of acceleration and such. This one doesn't suffer so much from floating point errors because the distances involved are usually quite small. Performance, however, is greatly affected by the number of parts interacting, and it is single-thread performance limited. Unity 5 is supposed to enable multithreaded physics, but I've heard it suggested by the physics/computer science types that the type of physics in KSP's part interaction is not multithreadable even if the engine supports it (something about a chained rigid body problem, the details are a bit beyond me).

It has been stated by the devs that they'll be sticking with Unity through 1.0 at least as it would require reworking the entire project to change, so I wouldn't hold my breath for an engine change any time soon.

Link to comment
Share on other sites

  • 6 months later...

I'm sorry to post in this old thread, but...

is it possible to treat crafts as solid bodies by switching off calculations of interactions between parts? To have a result like in the welding plugin but for the whole ship? Has anyone tried to do this?

Link to comment
Share on other sites

Ultimately we're dependent on Unity. I don't think KSP 1 would switch to a different engine, that will be too much work for Squad. Maybe KSP 2 could use a custom engine better suited to physics on solar-system scales.

its not exactly true. u can use havoc or bullet engine in unity if you want there is just no graphical aid in the editor for them... nothing stops u to do it though...

Link to comment
Share on other sites

Yes, but what about switching off physics inside your vessel? Thay would radically improve performance. Does anyone think the same way? Welding is good but has some limitations. Probably if you're building a ship that lags you've already seen enough explosions and disassembly. Personally I would exchange spagettiness of my space craft for some FPS increase and nice and smooth gameplay.

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