Jump to content

Is there a parts limit? (Game slows down and becomes unplayable)


Recommended Posts

Hey

I've been playing around with ksp for a couple of months now, and I really love the game!

But.. when you have "done it all", and try to expand the borders of the sandbox... my creations gets to big and the game becomes unplayable.

http://imgur.com/a/oTtBB#34

With this "spacestation" every ingame second is 7-10 seconds in real time. Making it slow and timeconsuming doing anything.

And.. before anyone blames my computer, I want to say ksp uses 20% of cpu and ram. (with max gfx and a 1000 part loaded)

I can run other games without any issues, while playing around with my spacestation in ksp

My web browser takes up more resources tbh...

My experiences with KSP tell me that if you exceed a certain amount of parts, the game slows down.. without any reason, it has more than enough resources to take from before starting to slow down.

My other friends who play the game tells me "just set it to unlimited fuel" then you dont need so many parts.. but no.. hell no.. thats cheating :)

Oh.. and I do have plans for 2 more "ships" to dock at this spacestation.. making the part count atleast 1500+

So my questions become.. is there a way to fix this?

Is it possible to raise the invisible limit of parts.. so the time dialation starts with a higher part count?

Are SQUAD looking into this issue at all?

And so on..

I could understand the game slowing down because of lack of resources.. but this is not the fact.

Help!

Link to comment
Share on other sites

The simple problem is that KSP calculates every single parts' physics every frame. There is no way to "raise the invisible limit" because there is no limit other than the power of your CPU and how Unity handles physics calculations. You could have a supercomputer and still have KSP lag like mad.

Edited by turkwinif
Link to comment
Share on other sites

Hi.

KSP relies on Unity with its ancient implementation of PhysX to do the physics with. This is a single-threaded process. So, while you'll be pegging one of your CPU cores at 100% while running monster KSP ships, the other cores are free to do stuff like, well, playing other games and running web browsers.

There isn't really much that can be done about this until PhysX/Unity changes, and I'm not sure if even that will help, if it isn't as simple as a drop-in replacement.

HTH.

Link to comment
Share on other sites

Unity 5, when it's released, will use a much newer version of PhysX, and I believe it has some multithreading implementation at the very least, which ought to improve performance besides what the new version alone will bring.

Until then, there's a rough boundary for each computer where too many parts will slow down your system. That limit is around 300 for me, but it's unique for each computer (even if two computers are using the same hardware, their limits may be slightly different based on the computer's age and other variables).

Link to comment
Share on other sites

Hi, put your space station in an orbit farther away from Kerbin and set "Max Physics Delta-Time per frame:" to 0.03 or 0.04 and see it that helps with lag.

Setting the delta-time value to be small will actually increase the slowness, as you're telling the game to calculate physics for smaller and smaller individual time-steps. It's a trade-off between speed, and accuracy. High delta-time values may help your craft to get into orbit in less time, but may well result in less accurate physics and, in extreme cases, sudden Kraken appearances.

In either case, it shouldn't adjust your frame rate, just the amount of time dilation involved.

Link to comment
Share on other sites

Since no one else has said it yet, you are also using modded parts. There is no guarantee they are well optimized, it is entirely possible that they lag more than others. Also, take a look at your Alt-F2 log and see if there are any errors popping up. If that's the case, even if it was only a single piece, having it throw errors every frame is going to add a lot of slowdown. Even so, that's going to be a lot of pieces and you will lag. Most people experience reasonable lag at five hundred parts, and eight or nine hundred is definitely going to damage performance. As has been said, it is because of how KSP handles physics and parts, even in space where none seem to be happening calculations are being done for each part. Combine that with what I said in my first sentence and you may find you have a larger recipe for slowdown than you think.

Besides, it's not like 1500+ is a small number of parts. Squad actually did a large optimization to the game in 0.23 to make five and six hundred part craft playable, but a lot of the limitations of KSP are caused by Unity. It's a fast development pipeline but I've never been impressed with it's performance and it will always be a restriction on how much optimization the developers can actually do. Squad said they do not intend to put a part cap in the game because if your computer can handle it, or you are willing to put up with it, they aren't going to stop you from building it. Will optimizations come? Are the developers working on it? Yes and no. If they can see one they can make they will but is not their focus right now.

That all being said, here is my advice: that space station is uglier than sin and wasteful to boot. De-orbit it and enjoy watching the slide show of it break up and explode. I can see your lifting stages are still attached, and if those aren't lifting stages, where exactly do you intend to fly this thing? You can fly ten parts across the solar system easily; the best advice for space stations is to GET RID OF EXTRA PARTS. In a scene of fifteen hundred you could get rid of three hundred and never know they went missing. Stations are big and laggy because you contend not only with the parts within the station itself, but any ships that plan on coming near it. Abandon your plans of bringing thousands of parts to the same 5km area, or accept lag as your religion. I don't rely on theoretical optimizations, I got over my 'intricately detailed' stage long ago and that is really the best approach if you are interested in performance right now.

Edited by Hyomoto
Link to comment
Share on other sites

Thanx for the answers.. does not help tho..

first 3 answers: how come NONE of my cores are at 100%.. I would have understand the issue with the Unity engine if it was so... none of my cores is at max (even with other games running is under 50%)

Conlusion.. do not blame the CPU.. it does not use all of one core either...

My old computer perform exactly the same.. (half the cpu power, but uses more of its resourses while running ksp)

When I have set the PhysX to be handled by one of my graphicscard how is physX reliant on the CPU cores?

It does not make any change in ksp when I switch who handles the physX..

And just because my spacestation uses mods.. why should that matter?

I had the same problems before I started modded.. began modding after I got the lag issue in vanilla install...

Link to comment
Share on other sites

Thanx for the answers.. does not help tho..

first 3 answers: how come NONE of my cores are at 100%.. I would have understand the issue with the Unity engine if it was so... none of my cores is at max (even with other games running is under 50%)

Conlusion.. do not blame the CPU.. it does not use all of one core either...

Your operating system is probably shuffling the workload between cores either for performance or thermal reasons. Basically it stops one core becoming overheated. For this reason, while you might not see a single core constantly working at 100%, the physics is still only being calculated with a single core at a time.

My old computer perform exactly the same.. (half the cpu power, but uses more of its resourses while running ksp)

When I have set the PhysX to be handled by one of my graphicscard how is physX reliant on the CPU cores?

It does not make any change in ksp when I switch who handles the physX..

Regardless of your Nvidia settings, the version of PhysX that KSP uses either does not have GPU acceleration available, or does not have it enabled. It's an old version.

And just because my spacestation uses mods.. why should that matter?

I had the same problems before I started modded.. began modding after I got the lag issue in vanilla install...

The comment above about errors being thrown is a valid one. You can test if this is the case by looking in KSP's output log, which in Windows should be in (KSP directory)/KSP_Data/output_log.txt. If you see a ton of NullReferenceExceptions or similar being thrown, then you might have a problem. There's also an in-game debug menu, the key combination of which I can't remember off-hand (alt+f12 or something like that). This will also show you any errors as they happen.

Really, 1500 parts is a hell of a lot of parts. Unless you have some kind of high-end Core i7, your best bet is to simply reduce the complexity of the vehicles you're sending up. At least until further optimisations are made to KSP.

...and while this is turning into a support discussion, I'm going to shift this thread over to the support (modded installs) forum. I've given it a [support - Windows] tag for now. Let me know if I'm wrong with that and I (or some other moderator) can change it.

Edited by technicalfool
Link to comment
Share on other sites

...put your space station in an orbit farther away from Kerbin.

This will definitely help some once you are above a certain altitude (I believe it is approx. 140km around Kerbin) but with those sorts of part counts the single threaded physics calculations are the real killer...

Link to comment
Share on other sites

So basicly KSP is just not optimized, and reliant on an old Unity engine?

If I reduce the complexity I reduce my game experience overall.. I've done what I can do for now.. I want to make use of the sandbox.. and have multiple BIG plans..

Like spacestation.. with several ships docked to it.

Colonies on planets, fuel stations and so on.

If SQUAD have no plans on changing out the unity engine and optimize the code.. well.. this is not the game for me.

I find it strange this havent been an issue for most of KSP players.. a buddy of mine stopped playing just because of the lag on the vanilla install..

This should have been a priority imho, upgrade the unity engine to an up to date one. BEFORE it hits beta...

Link to comment
Share on other sites

This should have been a priority imho, upgrade the unity engine to an up to date one. BEFORE it hits beta...

Heh, well right now Squad are using the most modern PhysX implementation that is available for Unity. As for optimizing, well, the game is near enough "scope complete" to use a much-used phrase. Once that's done, things like making the game load, or run faster, will very likely be on the table for the development team. In fact the last couple of versions have already seen some small increases in performance at least on my own systems. Certainly enough to be building stations with multiple 3.75m fuel tanks and docking ports attached, complete with spaceplanes ready to haul over to Laythe.

Of course, as far as mods are concerned, you don't always have to go big. You could go...

2014-11-06%2014-37-07.jpg

...multiplayer!

Edited by technicalfool
Splelelelelling
Link to comment
Share on other sites

Heh, well right now Squad are using the most modern PhysX implmentation that is available for Unity. As for optimizing, well, the game is near enough "scope complete" to use a much-used phrase. Once that's done, things like making the game load, or run faster, will very likely be on the table for the development team. In fact the last couple of versions have already seen some small increases in performance at least on my own systems. Certainly enough to be building stations with multiple 3.75m fuel tanks and docking ports attached, complete with spaceplanes ready to haul over to Laythe.

Of course, as far as mods are concerned, you don't always have to go big. You could go...

...multiplayer!

"most modern PhysX implmentation that is available for Unity." <-- do you mean it currently uses the same engine Wasteland 2 is using atm?

And other current games that uses Unity engine to its fullest? aka uses all the computers resourses before slowing down?

And yeah.. I've tried the multiplayer.. and made a spacestation we could dock at, and guess what? It started lagging.. :)

Fyi, my spacestation in singelplayer was ment to go to Jool and siphen karbonite out of the upper atmosphere to refuel (with all the stuff needed to colonise Laythe) :)

As I said.. grand plans.. maybe to grand for KSP.

Dont get me wrong, I love this game.. its only the limitations that bugs me.

Especially when I can run 3 Eve clients at 60 fps and play any up to date game.. at 40+ fps, even with a unity engine.. and my computer performs without any issues, except heat.

(Yes, I have 4 monitors to play on and a high-end pc)

Link to comment
Share on other sites

"most modern PhysX implmentation that is available for Unity." <-- do you mean it currently uses the same engine Wasteland 2 is using atm?

And other current games that uses Unity engine to its fullest? aka uses all the computers resourses before slowing down?

Yes, it uses a very recent version of Unity 4.5 but this uses a very old version of PhysX. Unity 5 (that uses a much more recent version of PhysX) has just gone beta so, hopefully, KSP will be updated to use it fairly soon (though probably not until it comes out of beta and definitely not in the next update).

Other games do not try to run physics simulations consisting of 1000+ interconnected rigid bodies so they don't suffer from the same effects...

Link to comment
Share on other sites

.. well.. this is not the game for me...

There's not a lot to add really.

Works fine for me on my old single-monitor, dual-core AMD, nVidia 610 system.

Maybe if I had all those toys like you, I'd demand everyone solve MY problems NOW though.

I expect you spend a lot of money on all that.

Hope you enjoy your other games.

Sorry you didn't like KSP.

Bye.

Link to comment
Share on other sites

There's not a lot to add really.

Works fine for me on my old single-monitor, dual-core AMD, nVidia 610 system.

Maybe if I had all those toys like you, I'd demand everyone solve MY problems NOW though.

I expect you spend a lot of money on all that.

Hope you enjoy your other games.

Sorry you didn't like KSP.

Bye.

Ok, thanks for the feedback.

I'm not demanding anything tho, just stating the fact. Atm this game is unplayable for me.

And the problem is that I like KSP, but not how it performs.

I'm sure it works well on your old computer because it does not matter how good your pc is, KSP is the bottleneck apparently.

Link to comment
Share on other sites

Sigh.

We like posters to be polite here. The forum rules (specifically 1.3, 2.2d, 2.2h and 2.3b) are set up pretty much in order to enforce that.

This thread was started by a user who is frustrated at a lack of frame rate. Helpful replies are most certainly encouraged. Insults or replies that could be easily perceived as insulting, are most certainly not.

Ladies, gents, various fuzzy creatures from Mars, I hope that is the only post I need to make on the subject. That is all.

Link to comment
Share on other sites

To put a little perspective on 1000 parts, I do research using molecular biophysics modeling software. It is a similar problem: where KSP models and integrates the forces on many spaceship parts over time, biophysics software models and integrates the forces on many atoms over time.

A back-of-the-envelope calculation suggested that 1000 atoms would take about 0.5 seconds* for a single core to evaluate. This is with software which is designed to do physics and nothing but physics all day: no graphics, no checks for whether a user is clicking on a part, no checks for whether fuel is flowing, just straight up physics designed to run on a supercomputer.

*A few software packages like GROMACS could do noticeably better, but they are optimized at a very low level using SIMD instructions, which are a pain to program with. I doubt the creators of PhysX ever seriously considered using them in their physics engine, because these calculations are not the bottleneck for most games: KSP is, as mentioned, an outlier.

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