Samples not working correctly in browser (DEF-3339)

Hi, I’m new here. I just started using Defold and I’ve already found a lot of bugs.

RPG map sample
Desktop version works fine. However there is problem with transparent backgrounds (alpha channel) for map objects in browser mode.

Shadertoy sample
Desktop version works fine too. However there is a black screen in browser mode.

More
There are problems with most tutorials/samples for browser. There are also smaller bugs in editor (but it’s not that important).

My hardware/software
System: Windows 7 Ultimate (x64) with SP1
Web browser: Google Chrome (official version) 67.0.3396.87 (64-bit)
Defold Editor 2.0 (downloaded today)
Graphics card: ATI Radeon HD 3800 Series

Any idea what’s the problem? How can I fix it?

It says in the log that there is an error compiling one of the shaders. Expanding the error reported in the log might give clues as to how to fix it.

For the ShaderToy example, it seems that some string in shaderSource is not ASCII, which might produce some of the errors (or, perhaps, a sympton of some null pointer?).

Upload your shader. Desktop shader compile is a lot more forgiving of errors than web and mobile.

I was looking for crash log file, but I couldn’t find that. There is no such file in editor directory, project directory, AppData\Roaming or AppData\Local. Also I couldn’t set crash file path, because the error occurred before any script.

I’m getting the same problem with the RPG Map when building for HTML5. @sicher any idea why?

Did you try Shadertoy or other samples for browser too?

Hmm, it may be a bug related to tile layer rendering. I’ll investigate.

1 Like

I get the same error here.

1 Like

This seems to be caused by certain PNG files (the PNG that causes problems has been run through ImageOptim to save space) and show up when you bundle your game or run for HTML5 in the editor.

This is a bug. You can fix it easily by opening the file “map.png” in the “assets” folder in any image editor and just resave the PNG.

Thanks for reporting!

DEF-3339

6 Likes