• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

HTML5 Sprites are just black boxes on HTML5/iOS but OK on android

Hi, could anyone help with a problem with HTML5 that occurs only on iOS?

My game actually works, but all the sprites are just black boxes.

The game works fine when built for windows, or HTML5 for any browser on android.

For iOS, the sprites are black boxes for Safari, Firefox, and Chrome, and whether the webGL setting is set to on, off, and automatic.

Any ideas how to fix this? Thanks

GG86209.jpg

Just some further info... have cleared browser caches, clicked the little broom icon to clear cache in GMS2, cleared all the other caches in GMS2, etc.

It also works fine with GMS2's built in browser in the windows IDE for testing HTML5.

Basically, something is going on specifically with iOS, causing the sprites to just be black boxes in all 3 of the main browsers. HTML5 on Android browsers works perfectly fine.

Any ideas? Thanks!
 

Roldy

Member
So it works on Windows and Andriod browsers but not iOS browsers.

Try and view a different GMS2 HTML5 app in iOS. Here is a jam game I did last month. It is GMS2 HTML5 export. Does it show up with black boxes?


So it works on Windows and Andriod browsers but not iOS browsers.

Try and view a different GMS2 HTML5 app in iOS. Here is a jam game I did last month. It is GMS2 HTML5 export. Does it show up with black boxes?

By the way that wasn't intended to run on a mobile device. But I have loaded it on iPhone and it seemed to 'work' ok.
 
Last edited by a moderator:
Yup graphics on your game seem OK, when I load it in a browser on iOS.

I've tried with a few different iOS devices that I have btw. Same results on each.
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Have you cleared the compiler cache before building? Sorry if that's a stupid question, but the HTML5 target is incredibly sensitive to changes in the cache and this is just the kind of issue that it creates. You can clear the cache using the "broom" icon at the top of the IDE.
 

O.Stogden

Member
I have this problem when trying to run an HTML file locally instead of on a web server, but it seems like this isn't the case for you. In that instance, it's caused by the game not loading the image assets correctly. Looks like the same is happening here, but for a different reason.
 
I wonder if it could relate to the server configuration? I am using Super Simple Server on a windows host to host the html5 files. Works on android browsers and PC browsers, but not iOS... I wonder if there could be something special about how iOS browsers retrieve these assets that could be different?

Interesting... may be some issue or bug related to the software "super simple server". When I connect with an iOS device over the local network to the server hosted by the windows IDE, it actually works OK on iOS devices. So maybe a bug with SSS, or possibly something https:// related as the other difference would be on the server I am using, there is a cert/https enabled.
 
I have this exact same issue!

Even made a post about it HERE

I'm using a MacBook to develop my game. The game opens up without a problem in Chrome, FF and Microsoft Edge. But when I open the game in Safari: black boxes... Or in my case, blue boxes (view image below). This can't be because Safari can't open GMS2 made games, since I can open Roldy's (member who posted earlier) game without a hitch. I find this all very strange? Something about my and goosemasterG's games that safari doesn't like?

Screenshot 2020-08-25 at 11.44.45.png
 
Top