StrataSource / Engine

Issue tracker for Strata Source
46 stars 2 forks source link

Enhancement: Remove particle manifest requirements. #387

Open koerismo opened 2 years ago

koerismo commented 2 years ago

What would this enhancement be for?

Other

Describe your enhancement suggestion in more detail

Have the game auto-load all pcfs present in mounts alongside maps' packed files instead of relying on particle manifest files.

This would remove the need for particles_manifest.txt as well as the per-map variants. Manifests should still be allowed to function, but omitting them should not cause any problems.

VortexParadox commented 2 years ago

This doesn't seem like a good idea, unless the engine can dynamically load all PCFs and related information when required. As otherwise it could be a big waste of memory space and there are issues related to too many particle systems loaded by the engine that hasn't been resolved, particularly because this can be managed and avoided by the user

vrad-exe commented 2 years ago

Why do the particle systems themselves need to be always loaded though, I don't get that...couldn't you just compile a list of which PCFs contain which particle systems whenever a new PCF is found, then only actually load the particle system into memory when it's needed?

VortexParadox commented 2 years ago

This is what the manifest lets you do, it tells the engine which PCFs to load when searching for particle definitions. It also tells which should be kept in memory and which can be disposed off after changing maps. If it were to load them all (or dynamically make memory for it) it will take a long time depending on your game mounts, making calls to search for it...

koerismo commented 2 years ago

Even with the manifest, the game still has to search through all of the mounts to actually locate the file. The manifest file only provides paths relative to any content directory.

VortexParadox commented 2 years ago

What you're asking might cause the game to search for them every time a particle wants to load. It's purpose is to load only what the engine will use. As it boots up (particles/ manifest) or as the map requires (<map_name>_manifest) The hold up when booting the game is much better than the holdup when attempting to use an effect in-game.

vrad-exe commented 2 years ago

I'm still extremely confused, someone please explain why manually adding every PCF to the manifest is any different than the game automatically recognizing all of those. The manifest doesn't specify anything other than PCF filenames.

VortexParadox commented 2 years ago

If you'd define them all your loading times will increase, even when the file is a binary one, it holds resources that will also cause the engine to read and load materials into memory. Dynamically streaming them in gets rid of the inital load times, but reintroduces them while playing which is obviously not preferred. These microstutters will not be taken lightly by players. Even if they last a fraction of a second

vrad-exe commented 2 years ago

I'm incredibly confused about how particle system loading works, your first comment implied that they were loaded on-the-fly while playing, but now you're saying they're preloaded on engine startup? Also my question still hasn't been answered regarding why there is a difference between automatically picking up all PCFs in the particles/ folder vs. manually adding all of those same files to the manifest.

VortexParadox commented 2 years ago

It does both, it depends on how you declare them (as I mentioned previously), you can read more about it here and specifically the tip here, sorry if my explanations are all over the place.

And on your second question, there wouldn't be any difference. But consider the explanation I gave as an addendum to why loading them on-demand is not a good idea