Page 1 of 1

Re: Sprites missing or corrupted

Posted: Mon Oct 12, 2015 3:32 pm
by kovarex
ALyingCommunist wrote:I have these same issues and forcing opengl doesn't seem to fix it. I have played it on this computer before, just not with windows 10 and not for a few months.
Did you try all the things from here ?
https://forums.factorio.com/forum/vie ... f=7&t=9300

What is your hardware config, can you post the log?

Re: Sprites missing or corrupted

Posted: Tue Oct 13, 2015 12:50 am
by ALyingCommunist
I did try all of the things on that post. I am not very computer savvy, so I am not exactly sure how or where to find my hardware config.

Re: Sprites missing or corrupted

Posted: Tue Oct 13, 2015 1:11 am
by daniel34
You can find the log file directly in the Application directory in the wiki entry linked by kovarex (https://forums.factorio.com/wiki/inde ... _directory).
With the Windows installer version of Factorio just enter %appdata%\Factorio in any explorer window or the run dialog (Win+R). You should find two files, factorio-current.log and factorio-previous.log, please attach both to your next post.

Please also post your CPU, GPU (graphics card), RAM and VRAM info if you know them, otherwise the computer model number could also help.
What OS did you have installed before (Win 7/8/8.1 probably) and what version of Factorio did you use (0.11 or 0.12)?

Re: Sprites missing or corrupted

Posted: Tue Nov 03, 2015 3:38 am
by Astregor
I recently updated to 0.12.16 and let it patch update. When I got in game, I started experiencing this same problem. I did my research and changed the config.ini settings, updated my AMD R9 drivers, tried multiple compatibility settings, have Run As Admin checked, and everything else I could find to get the sprites back. I got about half of them. I tried uninstalling, deleting all instances of the game from roaming and prog files, and installing an older version that was working. Nothing clears up the problem. The game is unplayable now. I hope it gets fixed soon.

Win10
AMD R9 255

Re: Sprites missing or corrupted

Posted: Tue Nov 03, 2015 6:03 am
by Bonzai
Astregor wrote:I recently updated to 0.12.16 and let it patch update. When I got in game, I started experiencing this same problem. I did my research and changed the config.ini settings, updated my AMD R9 drivers, tried multiple compatibility settings, have Run As Admin checked, and everything else I could find to get the sprites back. I got about half of them. I tried uninstalling, deleting all instances of the game from roaming and prog files, and installing an older version that was working. Nothing clears up the problem. The game is unplayable now. I hope it gets fixed soon.

Win10
AMD R9 255
I had the same problem after updating to 12.16.
A clean install of 12.15 solved it for me.

Re: Sprites missing or corrupted

Posted: Tue Nov 03, 2015 7:12 pm
by Astregor
Thanks Bonzai, that fixed mine as well.

Re: Sprites missing or corrupted

Posted: Wed Nov 04, 2015 10:41 am
by kovarex
Just to be sure, are you using the force-opengl option? Can you post the log?

Re: Sprites missing or corrupted

Posted: Thu Nov 05, 2015 12:16 pm
by posila
That is really weird you observe this error also with OpenGL.
We were playing with 3D application configuration in AMD Catalyst Control Center until it started to happen on our computer too (but, only with DirectX - force-opengl=false, though). It also kept behaving like this after driver setting were reset to factory default. So, we were finally able to debug it and we didn't find any obvious reason, why sprites should be corrupted, but we found workaround, that should prevent this. So it should be fixed in 0.12.17 (at least for DirectX).

Re: Sprites missing or corrupted

Posted: Thu Nov 05, 2015 8:54 pm
by orzelek
posila wrote:That is really weird you observe this error also with OpenGL.
We were playing with 3D application configuration in AMD Catalyst Control Center until it started to happen on our computer too (but, only with DirectX - force-opengl=false, though). It also kept behaving like this after driver setting were reset to factory default. So, we were finally able to debug it and we didn't find any obvious reason, why sprites should be corrupted, but we found workaround, that should prevent this. So it should be fixed in 0.12.17 (at least for DirectX).
Out of curiosity - can you write what was actually happening that corrupted the sprites?

Re: Sprites missing or corrupted

Posted: Mon Nov 09, 2015 1:49 pm
by posila
orzelek wrote:Out of curiosity - can you write what was actually happening that corrupted the sprites?
Factorio creates huge sprite atlas (preferably containing all the sprites in game). That way it can batch all drawing to just few draw calls (ideally). Because Factorio is highly moddable, sprites are distributed as separate files and sprite atlas is generated on startup.

Soo .. we create a texture for sprite atlas, then for each sprite we load a sprite to its own texture and render it to the sprite atlas. This is GPU accelerated, so sprite atlas is in VRAM, we load a sprite to RAM, upload it to VRAM and render it. In practice, this is handled by ALLEGRO_BITMAP, which will create one IDirect3DTexture9 using D3DPOOL_SYSTEMMEM and the second one using D3DPOOL_DEFAULT. It fills the system memory with pixels from PNG, and calls IDirect3DDevice9::UpdateTexture to update VRAM texture by its system memory copy. And for some reason, the UpdateTexture sometimes didn't work, and VRAM texture stayed filled with random garbage it started with.

Workaround was to use single texture using D3DPOOL_MANAGED, which automatically keeps RAM and VRAM copy of textures.