Sprite shows up on desktop but not mobile on my HTML5 bundled game

I have made a simple game that I have deployed onto a HTML5 site, when I access the site via my browser the game plays as intended however, when I access the game on my phone the player model does not render in

the sprite code still runs, you can tell as when the sprite comes into contact with a kill dot, it stops moving the floor, I have tried messing with the Z values as well as removing the background entirely but the model is still not visible.

Any help would be much appreciated!

--------------- EDIT / SOLUTION ----------------
For anyone reading the thread I had an atlas which was too large for mobile Imaking the atlas 2048 by 2048 worked well, IDK if there is a better solution but this works for now

1 Like

Sorry uploaded the same image twice


phone is a pixel 7a but it also doesnt work on my friends android

It might be worth noting that if I run in windows chrome but use mobile dimensions the asset still renders

Hi @samuel_croot !

The first step is to check that the sprites doesn’t have the exact same Z value, because that may lead to Z fighting (different objects end up in the background).

HI, I have changed the Z values of the player sprite tested with it at both 1 and 0.1 neither fix the layer issue, I also removed the background so it would just be the sprite but it was still not visible

I remade the atlas with fewer images per animation group and it worked, is there a hard coded limit on atlas sizes on mobile html5 or is there some way I could fix this?

It varies between phones. Did you get any error in the browser console?

You can read the console log of an iPhone via Safari on your desktop computer. Something similar is possible on Android.

I didn’t even think about the console on my phone, the error was right there. Is it possible for me to make the textures work in the full res?
I have downscaled them as a fix for now and its all working perfectly.

It’s a hardware limitation which you can’t really get around, but perhaps you can use multiple atlases instead?

Yeah, I can do thanks for the help :smiley: