Page 1 of 1

Game Slow Down With Edited Textures

Posted: Mon Feb 10, 2020 9:52 pm
by A_Wal_
Hello. The game's been running really slowly for the last couple of days to the point where it's a couple of minutes of a frozen screen for every few seconds of anims playing with slow cursor movement. I'm not sure if it's my laptop or something I've done but it's definitely gotten worse with the same number of units and objects.

I thought maybe there was too much on screen so I made an empty test map with fewer units and it seemed to work to start with but then the same thing happened again except this time the game crashed with this brand new error message:

index < mNumSquadTemplates
c:\dev\ba2_tile_shader\game\sidearena.h(235)


It might not be related but I'm hoping the reason this error was reported is because of the same thing that's causing the game to run so resource heavy.

Re: Game Slow Down With Error Code

Posted: Tue Feb 11, 2020 12:31 am
by pipfromslitherine
Please post the contents of the error.log file (Documents/My Games/SANCTUS) after a run with the slowdown as it may help shed some light.

Cheers

Pip

Re: Game Slow Down With Error Code

Posted: Tue Feb 11, 2020 4:38 pm
by A_Wal_
Thanks Pip. I know what might well be causing it. My edited textures are far bigger files than the images that I edited so I think I need to compress them. Never really done anything with image files before.

I'm using gimp and I can't match the original file sizes. What sort of compression are they? There's a few options much closer to the original size that all produce the same size file, slightly bigger than the original.

Re: Game Slow Down With Error Code

Posted: Tue Feb 11, 2020 5:30 pm
by pipfromslitherine
They are DXT compressed. XnView will compress textures using DXT IIRC, and you can also download the nVidia DXT toolset.

Cheers

Pip

Re: Game Slow Down With Error Code

Posted: Tue Feb 11, 2020 11:05 pm
by A_Wal_
Thank you very much, I'll see tomorrow if that solves the issue.

So uncompressed textures take more power to render, not less.

I assumed it would be the other way round because it means they wouldn't have to be decompressed on the fly.

Maybe that's not how it works and compression actually reduces the amount of data.

Re: Game Slow Down With Error Code

Posted: Wed Feb 12, 2020 3:51 pm
by pipfromslitherine
Yes. With modern HW the costs of accessing memory are almost always higher than raw processing. DXT can give 8:1 compression or better.

Cheers

Pip

Re: Game Slow Down With Error Code

Posted: Wed Feb 12, 2020 9:29 pm
by A_Wal_
Yep that was the issue. XnView doesn't have a dds option, maybe it needs a plugin. But I tried gimp again and matched the compression of the base textures.

The reason it was giving me a smaller file size with the highest compression is because I didn't have it set to generate mipmaps, now they're exactly the same size.

I'm not very experienced with image files as I'm sure you can tell, I feel more at home scripting.

I used the BC1/DXT1 compression. I'll change the topic title for others who ran into this with edited textures.

Re: Game Slow Down With Edited Textures

Posted: Wed Feb 12, 2020 10:07 pm
by pipfromslitherine
Glad you solved the problem :)

Cheers

Pip