A tidbit about ship loading

The -tracehods command exposed some information to us about what is and isn’t being loaded into memory that we didn’t have before. Based on my experiments so far, if a ship is listed a build file for an available race according to the filters(in single player missions, the rules might be a bit different in skirmish) it will be loaded at game start. Missiles and subs used by included ships will also be loaded. Otherwise things won’t be loaded unless they’re in the .level file. Things not in that list can still be spawned on the map later, and will be loaded durring the game.

This can be used to considerably reduce load times for testing certain things!


If you’re loading ships later,does it cause any freeezes or halts while loading?

Probably. My test case is only loading two fighters at the very start of the map, so it’s not anything noticeable, but logically if you’re spawning a bunch of high-impact ships you’d have to see some delays

You get a big impact in Survival game mode in STC with spawning of ships, I need to test it with the same race you’re using but it suggests to me to that the game cleans up those other ad-hoc loads from memory after they’re no longer on the map :thinking:

If you’ve got big hitches on every wave spawn, even if it’s spawning ships that’ve already appeared, it’s probably failing to generate a valid wave and having to retry a lot. Some debug prints in the wave picking would let you check and see if that’s what’s going on, though since printing is insanely expensive it’d also make the problem quite a lot worse temporarily.

If it is cleaning things up you’d probably get to see evidence of that by having -tracehods in there and checking the log for duplicate model loads.

1 Like