(SOLVED) Missing sprites in HTML5 release build

Hello! I’m finalizing a game and I’ve found that for some reason when I do a Release HTML5 build, some of my sprites are missing. For example, this opening screen

renders as just a teal box

And it’s not just sprites – when I get to the game proper, I notice some of my custom gui is missing (but not all of it).

Is there something I’m missing about release builds?

Nothing comes to mind that would affect this. Which version of Defold are you using?

1.9.6

Maybe there’s something I’m doing when not in debug that’s causing it :confused:

The first thing that comes to mind is using hashes as strings.

In debug, the hashes give you a human readable string, but in release, that debug functionality is disabled.

I don’t ever read my hashes other than to do a comparison. We don’t need to hash msg.post url’s, do we?

Do the sprites perhaps end up behind something else? Are they on the same z-value as something else?

1 Like

Ahh I got it. My own stupid fault, of course. I had a debug module that included this code:

local info = sys.get_engine_info()
if info.is_debug then	
	msg.post('@render:', 'use_fixed_fit_projection', { near = -100, far = 100 })
	msg.post('@render:', 'resize', { width = 562.5, height = 1000 })
	is_debug = info.is_debug and html5 == nil
end

I completely forgot that I need to set the projection and critically, the near and far value, when not in debug >…<

1 Like