Units with mutated models not being precached

Units with mutated models not being precached

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
YokoZar
Posts: 883
Joined: 15 Jul 2007, 22:02

Units with mutated models not being precached

Post by YokoZar »

In the new Spring, when I apply my BA Experimental mutator to replace some of the models with new s3o ones, I get a 2-second hang when I first build one of the modified units. This doesn't happen with the original models.

This smells like a bug - my suspicion is the engine is preloading the wrong models, or perhaps not preloading the mutated models at all. It's either that or s3o model loading is really slow for some reason.
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Re: Units with mutated models not being precached

Post by Gnomre »

What size are your s3o skins?

AFAIK no unit textures are preloaded per se--it's just that 3do units all share one large 2048x2048 texture file which is generated at the start of the game.

No S3O preloading occurs at all so far as I can tell. I even wrote a gimpy little "preloader" for IW for our Imperial Commander, which has its own 2048x2048 texture dedicated to itself. At game start this caused a second or two hang if there was an Imperial player. My preloader just renders with a gl.UnitShape waaaaay below the map before the game starts (that is to say, while the game clock is 0) and removes itself once the game starts. This essentially has the effect of preloading the texture immediately after the loadscreen.

However, one thing I did notice is that the loadup lag wasn't even noticable even on my old shitty athlon with the Rebel commander and its 512x512 skin in a Rebel vs Rebel game. So, that leads me to ask again, what kind of texture resolution are you using...?
YokoZar
Posts: 883
Joined: 15 Jul 2007, 22:02

Re: Units with mutated models not being precached

Post by YokoZar »

The texture file is 1.3 mb. That might be a source of it.

However, I don't quite remember this "on first creation of unit" lag when I tested the mutator in the old spring version. That could just be my memory though.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: Units with mutated models not being precached

Post by zwzsg »

I remember how on in very old Spring you could tell your opponent was teching up by the game freezing for a couple instants. Most probably unrelated to YokoZar's issue though.
Post Reply

Return to “Engine”