Jump to content

question about memory usage and part loading (and maybe a mod suggestion)


Kerba Fett

Recommended Posts

The 64 bit version of the game is buggy and while the 32 bit version is less buggy, it's also memory limited. When KSP runs, it loads all of the parts in gamedata, but could it load and unload them once the game is running? Everyone has parts they don't use but deleting them is a bit permanent.

Suppose you could base part loading on tech tree availability. If you play career and the part's not unlocked yet, why have it take up memory? Parts in unlocked nodes could be clicked on to load or unload them and anything not loaded into memory doesn't show up in the VAB and SPH part inventory. By adding a memory display you could fine tune your install for the parts you actually want to use rather than everything in gamedata. In the research building you'd also load and save profiles with different parts active like spaceplanes or rockets.

The one downside to this method is that you'd end up with some longer loading screens coming out of the research building after changing parts. You'd also need a warning to keep you from unloading a part used in an active flight unless you wanted to lose the ship as well. Or perhaps it could use a placeholder for unloaded parts and they could load from disk as you approach the vessel.

I'm no programmer, but would this even be possible? You can reload the entire database from the debug menu but will Unity and KSP let you load and unload stuff at will? I'd be willing to trade longer loading screens for more memory avialable for mods.

Or does a mod like this already exist and I just don't know about it yet?

Link to comment
Share on other sites

http://forum.kerbalspaceprogram.com/threads/59005-0-90-Release-4-3-Dec-16-2014-Active-Texture-Management-Save-RAM!

Plus, there is the trick of creating a shortcut of the ksp.exe and adding -force-opengl in properties.

If you want to go through the effort of converting your file formats, there is:

http://forum.kerbalspaceprogram.com/threads/96729-0-90-DDSLoader-1-8-%28Dec-15%29-Loads-DDS-Texture-Boringly-fast-edition

Link to comment
Share on other sites

What would really fix this is the optimization phase that hasn't happened yet because we're still playing with prototype software. Hopefully now that we're in beta that will be happening a little bit in each version, and certainly before going to 1.0. My pure speculative guess based on no information is it's on the list right below "fix aero", then maybe 64 bit might be moot if the asset loader is more efficient or there is protection against hitting the memory cap rather than crash where the software takes preventative protective severe garbage clean-up measures when application use gets to say, 3.0 GB.

It's not the parts though, not really. Its their textures (and models to a smaller degree). Some mods use models and textures more efficiently than others. Some mod makers like to use huge unique textures to make their stuff pretty, but if you halve the resolution you don't lose much graphically because it was so huge in the first place but you get a massive drop in memory use. Some use mapped textures across lots of models, these give you tons of parts for little memory use comparatively. These are the main reasons ATM and the DDS conversion procedures work to reduce mem footprint. Also why if you delete cfgs it doesn't help very much if you don't get the textures too.

It also seems from what I see around the forum and trying different setting myself as if there are some issues with offloading texture assets to VRAM (which ATM and DDS also help with) and is I think part of the reason why running OpenGL works to lower memory use. Seems D3D (both 9 and 11) may have some bugs in Unity related to this symptomed by the broken TGA loader, wouldn't surprise me of other aspects relating to texture loading were bugged as well. However, OpenGL has other bugs related to how it renders things in Unity and it's not as fast as D3D9 (simulation speed is faster).

Rbray, Sarbain, and Shaw certainly would know better. I'm coming to these hypotheses from I see from playing and tinkering, they actually code stuff related to these problems. So if one of the mighty modders or a dev says something else they are right and I'm wrong.

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