Thoughts on lowering load times.
1. Why OGG? Why not allow WAV? In fact... I wonder if WAV loading works? I might have to test that out.
2. Loading lots of small files is slow. This is just inherent to how this works. SSD's are better than non-SSD's for this task but probably more than half of the end-users won't have one.
Can't the JSON's be one long file (per major type, like .ship, etc.) that gets parsed at runtime? I'm kind of curious, now, what happens if they are all in one file per type. I'd imagine the parser errors out, but that might be the way. Most of the benefits of using a compressed format but none of the hassles.
It'd totally break the current editors and make editing individual entries more annoying, etc., I know... but these are side issues and backwards compatibility could be maintained. We're talking about Gold optimization here.
<tests> I put a .ship file in a .ship file, one after the other, with a comma.
JSON works, in the sense that it didn't crash, but when the CSV tries to reference it, it's clear the parser didn't read the second JSONArray, as we get a NPE. But there's no reason why the parser
cannot look for more than one entry in a .ship file, etc.
I know this might sound a bit silly, at this late date, but maybe that's one way to get Gold's startup super-fast.
3. I've been taking a look at what happens to Certain Things when as many textures as possible are atlased. Short answer: this would speed up Gold's load times considerably, as well as speeding up performance quite a bit (did a test to simulate what happens if all the weapons / barrels were on a 2048 the other day... yeah, it's huge, at least over here in ATi-land; I think next version of FX Mod will support atlases to further-reduce glBindTexture() calls).
Atlasing would also speed load-times up quite a lot, too. The game's loading hundreds of image files, after all.
Biggest problem there is that then things that reference a graphic need to reference atlas locations, which would get, uh, yucky.
Maybe atlases could get stitched together at runtime, or any time the mod collection changes, and then <some automation> deals with the atlas references? So, a slow first start for Gold, but excellent performance and faster startups thereafter, same with heavily-modded games?
Alex, you might find
this and
this interesting on that front. Appears that this is not a new cat to skin.
Gah.
This is brilliant. May have to implement, if the approach I'm using gets into trouble later on.