Open koerismo opened 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
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?
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...
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.
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.
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.
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
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.
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
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.