Been trying to export a project to HTML5 and have been running into problems.
Our setup: Defold Version 1.2.126, Windows 10, and we’ve tried browsers: Firefox, IE, Chrome , Edge (& Opera)
We have tried exporting the project to HTML5 using two different methods:
Project → Build HTML5
Project → Bundle → HTML5 Application
Method 1:
Attempting to Build HTML5 fails because we get 400 errors when the project tries to pull in some external libraries we are dependent on (britzl/defold-timer just so happens to be the first library encountered during the build). We then receive a response coded 404 (Not Found) when the webpage is launched (likely because the project is failing to build). We abandoned this method to try the Project → Bundle → HTML5 Application option.
Method 2:
It looks like there is an assertion failure in opengl that is causing a problem. We get gl error 1280, and a black screen in all browsers. Below is the console log output:
We’re at a loss for how we should proceed. After reading some other postings, we attempted to fiddle with the memory allocation settings and couldn’t make any progress using that method.
Any suggestions on what we might be doing wrong?
Thanks!
We tried following the trace, but the javascript generated for our application is a little too unwieldy (it’s over a million characters wide, all on one line).
You’re not really supposed to be able to debug errors in the engine code of an HTML5 build. The javascript is basically transpiled C code via Emscripten.
Do you use any custom shaders?
Are you able to build an empty project with a single extension?
The project is pretty big, but I don’t know that I would say it’s huge. The size comes mostly because of all of the images we are using (I think in total it nears 1GB). No custom .html file, we are just using the default index.html that’s provide when bundling. And I don’t believe we’re doing anything with textures - I probably would know it if we were?
Definitely will take that last piece of advice to heart, building for target periodically as we’re building the game would have been a superb idea. Will definitely be doing that going forward.
Is there a specific reason you’re using such an old editor?
The defold-timer extension has since been deprecated, and you should be able to use the now built-in timer module. They should behave the same in the general use case.