Sign in to follow this  
Jingle7620

PLZ help us by upgrading physics engine

Recommended Posts

First of i realy enjoyed the game, and had lot fun hours, but i reached a point in my campain where the game breaks, and i tried every thing!
But it all comes down to that KSP engine does not multithread physics, and ass soon you build some thing larger in the game, it breaks!

Again i realy enjoy KSP, but it's kinda broken for atm, so plz, on my hands and knees pleace! fix physics for large crafts!

Share this post


Link to post
Share on other sites

Welcome to the Forum! Have you considered using these? :) 

190px-Strut_connector.png

Seriously, people have built monstrous craft of thousands of tons and hundreds of parts in the stock game. Right now I'm working on a ship that will carry--internally--several landers of up to 80 tons all the way to Jool. Sometimes it just takes some clever engineering. Others swear by mods such as Kerbal Joint Reinforcement. (KJR) to make their really big ships behave.

Share this post


Link to post
Share on other sites
52 minutes ago, Jingle7620 said:

But it all comes down to that KSP engine does not multithread physics.

I second this, the physics engine is lousy, and scales extremely poorly with part count.
If you're talking about performance, no fix.
If you mean that your rocket breaks up on the pad, KJR dials part physics / gravity etc. up slowly, avoiding much of the "explode on load" effect. Or use moar struts, and not too many launch clamps.

All-in-all, physics is every bit as janky as it was back in 0.18... let's see if v1.1 offers any improvement.

Share this post


Link to post
Share on other sites

Hi Jingle, KSP is already being updated to the Unity5 game engine which uses a newer version of the PhysX physics engine.

Share this post


Link to post
Share on other sites
6 minutes ago, sal_vager said:

KSP is already being updated to the Unity5 game engine which uses a newer version of PhysX.

Which, unless you have some extra insider knowledge, does not multithread single vessel physics. And therefore does not address the request.

Will it be fixing the "explodes on load due to sudden physics start" phenomenon? or the "Base explodes on load due to poor terrain collision detection"?

Edited by steve_v

Share this post


Link to post
Share on other sites
1 hour ago, Jingle7620 said:

... fix physics for large crafts!

@Jingle7620

Hi there, as far as my experience goes (about 2500hours...) Is stock game KSP very stable now, i can launch vessels with up to 700 parts and up to 20 stages from boosters til parachutes without any gamecrashs. Windoze 10, i7 and AMD graphics. Perfect. Nothing to rant here however.
And i tested on a dualcore i5 Laptop, stable but more laggy, clearly the faster the chips are, the faster the sim runs.

How large is large?

Share this post


Link to post
Share on other sites
16 minutes ago, sal_vager said:

 

I think people need to wait to see KSP 1.1 before they judge it.

Never a truer word spoken....

Share this post


Link to post
Share on other sites

Problem is, KSP is the only recent game I know of that has to deal with vehicles (or anything) made from dozens of joined physics objects. I wish there was a direct competitor so we could compare their approaches.

Share this post


Link to post
Share on other sites

Struts are your friend

The largest ship I have launched into orbit (and even sent to Dres) consisted of 1268 parts on the launchpad and 1100 parts after achieving LKO ... I even refueled it in orbit with a tanker that after docked made the ship 1376 parts.

Lag is an issue once I go over 800 parts, however I manage to FIX any explosions on load or such by analyzing the F3 window, finding where the weak points are and strutting those areas up.

You cant expect to strap tons of parts and fuel on top of a bunch of rockets and have a successful launch if the ship starts to do a shimmy on the launch pad.

Moar struts is a good idea but where you place them and how is important as well. Placing a strut in one area to correct a load shimmy could induce a shimmy somewhere else ... This is the part of the trials and tribulations of launching monstrosities into orbit, call it QA testing lol

And if you do not believe me about the part counts I have launched, then you can find my mission report HERE

 

Edited by DoctorDavinci

Share this post


Link to post
Share on other sites
4 hours ago, steve_v said:

Which, unless you have some extra insider knowledge, does not multithread single vessel physics. And therefore does not address the request.

Will it be fixing the "explodes on load due to sudden physics start" phenomenon? or the "Base explodes on load due to poor terrain collision detection"?

 

Well, since there isn't a commercially available physics engine that multithreads single groups of connected rigid bodies to the best of my knowledge, if that's your standard, then there is no solution short of asking Squad to write their own physics code, and I'm not going to bet on Squad doing a better job than people that have been writing that kind of code for years.

This isn't to say that there isn't room for improvement.  Just switching to PhysX 3.3 should be about a 30% improvement due to optimizations within the PhysX code, and that's almost worst case.  Some parts of PhysX 3.3 have been improved more than that.  Besiege, which is probably the closest Unity game to what KSP does got a rather large boost from the switch to Unity 5 even though it suffers from the same multithreading challenges that KSP does.  On the other hand, just because Beseige got a large boost doesn't mean that KSP will.

One of the biggest problems with large craft in KSP right now has nothing to do with physics simulation.  The resource code can be a bottleneck as well, since it's order(n2), which means every time you double the number of parts, you increase the work the resource code needs to do by a factor of 4.  The devs are aware of that bottleneck and have at least hinted that they're looking into improvements that can be made.

At any rate, suggesting switching to a different game engine has been on the do not suggest list for as long as I've been aware of the do not suggest list, specifically because it would almost be starting over.  Look how long it's taking Squad to update from Unity 4 to Unity 5.  Now imagine how much worse it would be if they were switching to something that doesn't even try to be compatible with the current game engine.

 

Edited by Eric S

Share this post


Link to post
Share on other sites
13 minutes ago, Eric S said:

At any rate, suggesting switching to a different game engine has been on the do not suggest list for as long as I've been aware of the do not suggest list.

And nowhere in that post did I suggest switching physics engines. I simply pointed out that there are no guarantees Unity 5 will be a magic fix for the current issues, and that it won't, as you say, address the multithreading request.

Brushing off every "performance sucks" or "the physics are wonky" post with some variation on "U5 is coming, it will make all the problems go away" is getting rather annoying.

Share this post


Link to post
Share on other sites
1 hour ago, steve_v said:

And nowhere in that post did I suggest switching physics engines. I simply pointed out that there are no guarantees Unity 5 will be a magic fix for the current issues, and that it won't, as you say, address the multithreading request.

Brushing off every "performance sucks" or "the physics are wonky" post with some variation on "U5 is coming, it will make all the problems go away" is getting rather annoying.

Sorry, that came out wrong.  I was more saying that if you (generic you, not steve_v you) think multithreading is the only acceptable solution, you're setting yourself up for disappointment.  Noone outside of a research project or two is having much success applying multithreading to this particular problem, and I'm not even sure that the methods used by said research projects would apply to KSP physics.  So even if you (again, generic you) think that a game engine change should be fair game, it's not going to get you the multithreaded physics you want.

Also, I'm not brushing off anything.  I expect U5 to bring at least a small performance increase, and potentially a large one.  Some of the improvements in U5/PhysX 3.3 may smooth out a few rough edges in KSP's physics simulation, but I'm not expecting many improvements there just from the Unity upgrade.  We may even see regressions.  I do think that waiting for 1.1 is reasonable since it's getting close and has the potential to have a major change on the scope of the problem.

However, even outside the physics engine, there are things that can be done that might improve performance, particularly resource utilization, since it's order(n2) so has a larger impact on ships with more parts.

 

Share this post


Link to post
Share on other sites

Thanks for all the reply's, your guys are great! ;)

I am looking forward to seeing the new unity engine in action, hoping that it will fix most of the problems I'm having!

To specify, my problems is the game grinds to newly complete stop around my stations and bases, making it almost unplayable!

Share this post


Link to post
Share on other sites
6 hours ago, Mikki said:

@Jingle7620

Hi there, as far as my experience goes (about 2500hours...) Is stock game KSP very stable now, i can launch vessels with up to 700 parts and up to 20 stages from boosters til parachutes without any gamecrashs. Windoze 10, i7 and AMD graphics. Perfect. Nothing to rant here however.
And i tested on a dualcore i5 Laptop, stable but more laggy, clearly the faster the chips are, the faster the sim runs.

How large is large?

hmm, I'm not sure how large the part count is, it's several vessels docked together!

you said to stock ksp don't have problems, do mods add alot of "lag" ?

Share this post


Link to post
Share on other sites
36 minutes ago, Jingle7620 said:

do mods add alot of "lag" ?

Some do, in varying ways. e.g. graphical mods add GPU load  (obviously), some of MechJebs modules add significant CPU load. Sometimes a mod bug/exception spam or poorly implemented UI can cut your framerate in half.
Best leave mods out of it and compare apples with apples.

Share this post


Link to post
Share on other sites
20 hours ago, Jingle7620 said:

hmm, I'm not sure how large the part count is, it's several vessels docked together!

Go into your map view and click on the little button with the 'i' on the right hand side of the screen. This is info about the current vessel and will show you total part count of the ship currently in focus

Share this post


Link to post
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.

Sign in to follow this