Jump to content

Recommended Posts

As we all know, KSP2 strives to improve upon the first game not only in terms of graphics, progression, customization, etc., but also in how well the game should perform - vessel physics, for instance, are an outstanding problem.

However, I haven't seen much discussiom around memory usage and loading times. As many others, I play(ed) KSP with RO/RSS, a couple of other realism mods and a metric ton of part and gameplay modifications that both filled the tech tree and added near-future stuff.

As such, I stopped playing once loading times went past 20 minutes. It was an incredibly frustrating experience because, while I couldn't really complain about FPS or ships blowing apart, I just didn't have enough free time to spend in waiting half-hour for the game to load. Essencially, KSP is quite moddable in its own right... but it doesn't scale well for large modpacks.

This has been blamed on both Unity limitations and some infamous bugs. ModManager managed (heh) to optimize loading times to a degree, but this issue runs deeper than that. Same thing happens with RAM usage.

Will/could this be dramatically improve(d) in KSP2?

Link to post
Share on other sites

I hope so. My old PC took around 25 minutes to load my heavily modded KSP install off of a Hard disk drive. I went to a new PC (largely because of my love for KSP) with a samsung 970 m2 ssd and it cut it down to a few minutes. The difference was massive. KSP load times are possibly the worst I've ever seen. Many other games, I can't even read the tips on the loading screens because there isn't time, but not with KSP...

Link to post
Share on other sites

It hasn't gotten extensive write ups to what it does at low level but look at Spacial Scene Graph discussion from fairly early on. Each ship exists in it own private universe subset of just enough to effect the gravity of the situation in seems.

It seems like it does take away lot of the heavy lifting and might add lots streamlining to the load process, even maybe offload mods, assests not in scene for all we know so far.

Link to post
Share on other sites

Well, IIRC the core of KSP is more or less still the same as it was years ago - which can only be optimised so far.  With KSP2 and using a clean slate, the game should be much more optimised to make use of current hardware. I am no programmer, but what bugs me the most is that KSP  is loading ALL the assets into memory, resulting in a high memory load and long loading times until all assets have been loaded, all patches applied etc. I wonder - again: no programmer here - if it were not possible to only load, say the stock parts, visual/gameplay mods and then all further assets are only loaded once needed (i.e.  a save is being loaded with certain ships using said parts or I select a part in the VAB).

Link to post
Share on other sites
30 minutes ago, StarStreak2109 said:

I wonder - again: no programmer here - if it were not possible to only load, say the stock parts, visual/gameplay mods and then all further assets are only loaded once needed (i.e.  a save is being loaded with certain ships using said parts or I select a part in the VAB).

It's always a compromise between loading upfront and possible stalls when you're playing the game. I do suspect, however, that the big part of the problem is that Squad was basically building a resource system on top of resource system. The ship files are not-quite-JSON, which makes me concerned that it might be using custom parsers every time it's loading things, and that just doesn't naturally lead to anything you can stream.

In a perfect world, you do all your parsing upfront when you build assets for the game. Unity will do that with any internal assets - it's not going to just store raw models and materials. They get built into easy-to-ingest binary formats. Ideally, you want data on the disk to be byte-for-byte what you want in memory. That way, CPU doesn't even have to spend time with it. It can be streamed from drive to RAM and be used as soon as the process finished.

With a KSP ship, the engine doesn't have anything to signal it that it's going to need to load certain parts. There's nothing built into Unity that will have it recognize that you're approaching a station with a certain list of parts and it needs to make sure that models, textures, and materials for these parts are in memory, because none of these things are a part of the Unity scene. I'm sure there's way to trigger that from the game code, but it essentially means building your own streaming system that works a step ahead of Unity's own. So doable, but not trivial.

But even then, I wouldn't expect the up-front loading to take quite so long. I'm pretty sure a lot of the time is just spent parsing custom data. If you want to read a part file, you have to first read the text data from disk into memory, then parse it into some sort of a tree representation, and finally walk that tree to find the data you actually need. It's all the work that's normally done at build time done when the game is loading. This is very suboptimal.

 

There are a lot of ways Intercept can avoid all of this. They can find ways to use more native representations of resources, they can have custom build steps, they can cache intermediate data, and they can have some combination of all of these. It's hard to say whether any of this is being done, but there are definitely ways the loading times can be improved - with or without mods.

Link to post
Share on other sites

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