I’m currently toying with tilemaps and just tried to create a HTML5 build (for fun).
Two annoying things happened:
1/ It’s not as fast as it is when I build on Defold (where it’s “perfect”). Is it normal? edit: “fixed”, the html5 build runs smooth now… My computer was probably a bit tired the other day
2/ More important at this point: one on my layers (well, maybe all of them but it’s super obvious with this one) doesn’t work as intended > The transparency is replaced by a black background:
Not sure your exact issue but one observation is that it seems to only occur where tile objects are placed above the lower layer , maybe this is a clue. My first guess is some sort of z fighting going on.
It seems there’s a difference between how the editor calls the texture generation function, compared to how bob.jar does it.
When copying the texture from an editor build to the bob built content, it works as expected.
The image is using an indexed PNG and not an 8bpp RGBA image. If you resave it with the correct color format it works. This is a known issue that we’ll hopefully solve at some point.
Unfortunately, we don’t support this format (yet), although it seems the editor actually can support it. I’ll leave the ticket open for now. We are happily accepting pull requests for fixes like this
I downloaded Gimp (since I don’t have a Photoshop license), exported the image to the correct format (8-bits RGBA) and now the HTML5 version works as intended.
Note: @britzl your updated image was not in the correct format
Anyway, my issue is fixed (even though the source of this issue should be fixed so other users won’t be confused) and I learned a few useful things in the process.