[SOLVED]Lizard Attack Animation is Blue Blur in Android

I’ve built my Glitch Garden and transferred it to my Nexus 7. Most of the game works fine, except when the lizard attacks anything, when it turns into a vibrating blue splodge. The PC version is okay, and the fox attack animation is normal. If the lizard kills the defender and goes back to walking the walk animation is fine too.

My guess is that this has something to do with the huge number of frames in the lizard attack, but I’m not keen on manually removing half the frames. Does anyone know a less manually intensive way to fix this?

Edit (31/12): I’ve tried it with many less frames in the animation and at a slower animation speed and it makes no difference. Oddly, on my mobile phone the animations all play fine. The Nexus 7 is the older model, which does have performance issues, so I can only assume it is something to with that.

Have you tried removing completely the app and its data from the phone and uploading it again from scratch? It may well be that the data about the animation has been corrupted during the upload.

Good thought. Sadly it didn’t make any difference, even when I tried a factory reset. Thanks for the idea though.

By any chance, is this what you see on the Nexus 7?

If it’s so, then it’s a texture compression problem, to get this I set the compression of the lizard’s attack sprite to 256. Check if you inadvertedly have overridden the Android compression of this sprite to a value lower than 4096, even if it’s strange that it happens only on the Nexus and not on the others Android mobiles.

No, the sprite compression shows as 4096, higher than everything else actually - I vaguely remember something in the course getting us to set it like that, I think.

I’ll see if I can work out how to get a screen capture in Android - the image I am getting is more of a solid blue with a blurry, moving outline.

Seems to be a mip compression problem, but I have no clue why it is happening.

There is a topic on the Unity3d forum that a user gives a solution for that, would you mind giving it a try?
problem with really blurry textures

Just to be sure, you have the Default compression set at 4096, and the Android specific setting tab is not active, right?

If that’s the case, you can upload all your project to GitHub and we can check if we get the same bug on our phones and/or search for some wrong setting.

The attached screenshot is what it looks like. As you can see it doesn’t have the out-of-focus or pixellated look of typical resolution issues. What isn’t obvious on the still image is that the outline looks flickery and blurry in real-time - this still-shot has sharp edges so that must be down to the animation.

Default for the lizard attack animation is 4096 Compressed and the Android override is not ticked.

I am using Unity 5 and the Unity heading ends “Android DX11 on DX9 GPU” (with angled brackets around the DX bits) which seems odd - for WebGL it just says something like “WebGL DX11” - so I don’t know whether that means anything.

Meanwhile I’ll attempt to get myself onto GitHub and upload the project.

Edit: I have managed to upload the project to GitHub as a UnityPackage - I hope that’s what was wanted. It is at https://github.com/BlackPhi/GlitchGarden.

Edit2: It seems the problem is to do with the resolution setting for that sprite sheet. It is normally 4096, and I get the flickery blue block; if I set it down to 1024 I get the proper animation, but looking badly ‘out of focus’; if I set it to 2048 then it is again the proper animation, this time just a bit unfocused. It looks as though the Nexus can’t handle the higher-resolution sprite sheet for some reason. I guess the solution will be to edit the sprite sheet itself to halve (quarter?) its size, so I can reduce the setting to 2048 without it looking bad.

There’s clearly something odd going on with the Nexus and sprite sheet width. I tried halving the number of sprites in the sprite sheet, so it was 3 rows of 15 sprites (3,765x558 pixels): that looks okayish at 2048 compression whilst still failing at 4096. However if I reorganised the sprite sheet to 9 rows of 5 sprites (1,255x1,674 pixels) then both 2048 and 4096 work fine. I’m guessing that it’s something to do with one of the dimensions being more than 2048 pixels. Anyway, the game now works properly on my old Nexus.

Thanks for the advice and input, Galandil and Joao_Dalvi.

Does anyone know a good tool for reorganising sprite sheets? Doing it by hand is horrible!

Wow, that’s one sick problem of the Nexus, I’m glad you found what was the problem though, I gave a shot at it downloading your project, but on both of my mobiles I had no problem whatsoever (even on a real old and cheap one, a Cynus E1 with Android 4.2.2 on it).

Sadly, I have no idea what kind of tool is useful in re-organizing quickly sprite sheets. :frowning:

1 Like

I’ve found a thread on the Corona forum which addresses exactly this problem:

It’s a good read to understand this limitation.

And here, there’s an advice on how to know the max resolution allowed on a specific phone model:

1 Like

Privacy & Terms