Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Pages: 1 2 [3]

Author Topic: Loading times  (Read 16410 times)

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia
Re: Loading times
« Reply #30 on: December 27, 2017, 05:42:20 PM »

GraphicsLib generally adds 5-20% to the load time depending on various factors.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Loading times
« Reply #31 on: December 27, 2017, 09:13:11 PM »

Ah, cool, that's not very much at all, then - thank you for letting me know. I wonder where most of the load time is coming from, then - are mods just adding ~5x the assets of vanilla? Sounds tend to have a longer loading time, in my experience, so have been aiming to keep vanilla sound file sizes down...
Logged

NightKev

  • Commander
  • ***
  • Posts: 104
    • View Profile
Re: Loading times
« Reply #32 on: December 27, 2017, 11:52:55 PM »

So if I deleted all the music files from the mods I use would that reduce loading times?
Logged

Midnight Kitsune

  • Admiral
  • *****
  • Posts: 2846
  • Your Friendly Forum Friend
    • View Profile
Re: Loading times
« Reply #33 on: December 28, 2017, 12:19:09 AM »

So if I deleted all the music files from the mods I use would that reduce loading times?
You can just turn off sounds in the launcher and it won't load them
Logged
Help out MesoTroniK, a modder in need

2021 is 2020 won
2022 is 2020 too

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Loading times
« Reply #34 on: December 28, 2017, 08:55:35 AM »

So if I deleted all the music files from the mods I use would that reduce loading times?

Music is not loaded on startup - it's streamed from disk - so that actually wouldn't make any difference. Just FYI, though, the "delete music files" approach would just cause the game to fail to load as those files would still be referenced from data files.
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Loading times
« Reply #35 on: December 29, 2017, 05:55:55 PM »

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.
« Last Edit: December 29, 2017, 06:20:28 PM by xenoargh »
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Histidine

  • Admiral
  • *****
  • Posts: 4661
    • View Profile
    • GitHub profile
Re: Loading times
« Reply #36 on: December 29, 2017, 07:30:40 PM »

On the Spring game engine (for technical reasons I haven't investigated, can't guess at and wouldn't really understand if explained) it is recommended to install games as a single zip/7z archive (with a different file extension) instead of the engine's "pool" system (loose files filenamed and foldered by hash) for faster loading times.
How likely is such a thing to help here?
Logged

zaimoni

  • Commander
  • ***
  • Posts: 110
    • View Profile
Re: Loading times
« Reply #37 on: December 29, 2017, 07:39:21 PM »

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.
Be prepared for a 5x-10x increase in file sizes.  WAV has almost no compression.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Loading times
« Reply #38 on: December 29, 2017, 08:21:39 PM »

Guys, I appreciate the discussion, but this really isn't the place for it.
Logged
Pages: 1 2 [3]