Jump to content

Stream Mods from hard disk rather than load into memory.


Recommended Posts

KSP could be a lot more mod friendly if you followed best practices for how the program loads content and handles it. You could make the program use a ton less than it does now by just loading from the hard disk when needing to be used and anything not on is garbage collected in the memory. Not to mention it would eliminate the long loading screen at the bottom and probably use 1/3 of the memory if not more than it uses now.

Link to comment
Share on other sites

Most of this is currently handled by Unity's own file loading system, AFAIK. Doing this would require coding an entirely new loading sequence from scratch... or I guess potentially finding some open source, freely-available codebase to work with on this matter...

Link to comment
Share on other sites

I suggested this before and was met with refusal for the most part. Apparently, if it only works well with audio (Native Instruments' Kontakt uses disk streaming to load samples on the fly as you press the key, Vienna Symphonic does that and even supports loading samples from a second PC[it's library being 750 GB large]), probably won't work in pc, as stated by some, even though Space Engine, Batman: Arkham Asylum, Burnout Paradise, Fallout: New Vegas and a few other ones use Dynamic Loading as well, instead of running entirely from RAM.

Link to comment
Share on other sites

I suggested this before and was met with refusal for the most part. Apparently, if it only works well with audio (Native Instruments' Kontakt uses disk streaming to load samples on the fly as you press the key, Vienna Symphonic does that and even supports loading samples from a second PC[it's library being 750 GB large]), probably won't work in pc, as stated by some, even though Space Engine, Batman: Arkham Asylum, Burnout Paradise, Fallout: New Vegas and a few other ones use Dynamic Loading as well, instead of running entirely from RAM.

Its ridiculous because you could have this setup by a Indian programmer in a couple days. Good to see Squad is putting the money to good use. Stop working on career mode which noone cares about and put the money where it actually matters.

Link to comment
Share on other sites

KSP could be a lot more mod friendly if you followed best practices for how the program loads content and handles it. You could make the program use a ton less than it does now by just loading from the hard disk when needing to be used and anything not on is garbage collected in the memory. Not to mention it would eliminate the long loading screen at the bottom and probably use 1/3 of the memory if not more than it uses now.

The primary problem with your idea is that as soon as anyone needs to load the VAB, they have to load everything anyway so that the parts are available for use.

Link to comment
Share on other sites

The primary problem with your idea is that as soon as anyone needs to load the VAB, they have to load everything anyway so that the parts are available for use.

Not really. You could load the parts and put them into RAM when needed. Then you offload other parts that aren't being used at the moment from RAM.

Link to comment
Share on other sites

The primary problem with your idea is that as soon as anyone needs to load the VAB, they have to load everything anyway so that the parts are available for use.

Only the parts being used on the rocket need full res textures. The entire parts catalog could use quarter res mipmaps and low quality mesh for the thumbnail, and only the current page of the current section absolutely needs to be loaded anyway. Loading everything always is just not necessary, but likely to be addressed if Squad gets in an "OPTIMIZE!" mood.

Link to comment
Share on other sites

The problem can escalate to a point that we won't be able to run the Stock KSP because of how much RAM it uses. KSP doesn't use parallel processing, nor it's 64 bit and relies into copying the eintire game into RAM.

Edited by MR4Y
Link to comment
Share on other sites

While a good idea in concept it really only affects the where you wait not how long. Either wait three minutes at the beginning once or three minutes every time you enter the VAB or SPH. Personally I just take the time to grab a fresca or go to the bathroom and relax

Link to comment
Share on other sites

Most of this is currently handled by Unity's own file loading system, AFAIK. Doing this would require coding an entirely new loading sequence from scratch... or I guess potentially finding some open source, freely-available codebase to work with on this matter...

Please (you and others) stop repeating this falsehood. KSP already has its own file loading system, and it's about as primitive as you can get. This is absolutely something that can and must be solved by Squad.

Link to comment
Share on other sites

More like needs to be something with function in mind instead of a quick fix. They'll never leave the alpha stage this way. Yes, the alpha stage is where you implement features, but you can't implement features under a base that needs to be fixed constantly.

Link to comment
Share on other sites

Either wait three minutes at the beginning once or three minutes every time you enter the VAB or SPH.

I take it you've never played Oblivion, Skyrim, GTA, or any of the other countless games that, in just one minute of gameplay, stream - in real time - more data than the KSP folder even contains.

Link to comment
Share on other sites

I take it you've never played Oblivion, Skyrim, GTA, or any of the other countless games that, in just one minute of gameplay, stream - in real time - more data than the KSP folder even contains.

Area loading is a lot different than what KSP does that's rendering a cell from a preset database KSP has to account for whatever you can and will build meaning it is actually a lot more complex. That and C# is a lot more. Effecient than squads system at loading.

Link to comment
Share on other sites

Area loading is a lot different than what KSP does that's rendering a cell from a preset database KSP has to account for whatever you can and will build meaning it is actually a lot more complex. That and C# is a lot more. Effecient than squads system at loading.


if(bVisible)
{
LoadGfx();
}

Complex indeed.

Link to comment
Share on other sites

Area loading is a lot different than what KSP does that's rendering a cell from a preset database KSP has to account for whatever you can and will build meaning it is actually a lot more complex. That and C# is a lot more. Effecient than squads system at loading.

I can give you a LIST of games that use dynamic loading for a MULTITUDE of tasks, not only area loading.

-Burnout Paradise loads car models during the selection screen when you pick them.

-Dead Space 2 uses a lot of dynamic loading tricks, which explains why the game apparently has no loading screens at all.

-The PSP port of Disgaea 2 loaded it's spells from the disk. The animations before them were just there to mask the loading.

-The C64 version of Dragon's Lair and it's sequel loaded the next level while you were playing the level before that.

-The God of War series was acclaimed for it's lack of loading screens.

-In Legend of Zelda: The Wind Waker, islands load while you are sailing towards them. In fact, the developers set the sailing speed as seen in the Gamecube version in order to ensure the islands do get loaded.

We don't need to go so far. Operating systems use dynamic loading ALL THE TIME.

Edited by MR4Y
Link to comment
Share on other sites

unless you're overloaded with mods and addons, there's no need for any of this. And if you are, you're in trouble anyway.

My RAM is a lot faster than my hard disk, to have to wait a minute whenever I click something in the VAB or it comes into view anywhere, and that's what would happen, would be an unacceptable burden.

Link to comment
Share on other sites

[quote name=jwenting;898462

My RAM is a lot faster than my hard disk' date=' to have to wait a minute whenever I click something in the VAB or it comes into view anywhere, and that's what would happen, would be an unacceptable burden.

Good for you. Unfortunately, we don't have the same hardware you have.

Link to comment
Share on other sites

unless you're overloaded with mods and addons, there's no need for any of this. And if you are, you're in trouble anyway.

My RAM is a lot faster than my hard disk, to have to wait a minute whenever I click something in the VAB or it comes into view anywhere, and that's what would happen, would be an unacceptable burden.

You're underestimating the throughput of a hard drive. An old PATA drive would handle it all in a couple of seconds, and for any modern drive it would be about one second or less. We aren't dealing with a bunch of 4096x4096 textures. And if we are, then as I've said before mipmaps are great and should be in use.

Link to comment
Share on other sites

It would actually create a more processor intensive system creating lag and since ksp is single threaded therr isn't much room to work with

Code that would be active for only a second (or fraction of one) at vessel switch/encounter or on entering VAB/SPH is hardly "intensive"... unless you're trying to play KSP on a Pentium II in which case you're gonna have a bad time no matter what.

Link to comment
Share on other sites

Nobody ever played FSX? IF FSX loaded all planes, sceneries and ground objects at one time, you computer would melt. Instead, it has a menu to choose and load your aircraft and then while in the simulation, it loads things that are only visible. Even though, it uses lots of gigs in RAM however provides a beautiful gameplay. It wouldn't be so difficult for SQUAD to create a dynamic loading system which would improve the gameplay a lot and help SQUAD not thinking desperately if they should add a feature or not.

Link to comment
Share on other sites

Good for you. Unfortunately, we don't have the same hardware you have.
XD there is no way your ram is slower than your hard drive. Ram is way, way faster- tens of gigabytes per second versus maybe 100-200 peak for a mechanical hard drive, and that figure drops if seeking around the platter.

Edit: Idea: Having to load from disk would be bad IMO but what about loading from a separate thread dedicated to holding the parts, textures, etc that aren't in use, basically a ramdisk? (That should be possible maybe and if hard drives are being considered anything would have to be better.) The problem with only loading what is being used is what happens if you build a rocket with so many unique parts you can't load them all at once? Do you drop down to super low-rez textures, do you somehow fetch each one in and out just in tome, I don't even know.

Edited by austincurr
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...