I tried the HTML5 build with the 4.1 release and I’m getting build errors. Any help on this would be appreciated.
Below are some of the type of warnings I’m getting:
warning root: jcache is deprecated and not supported in fastcomp (you should not need it anyhow), disabling
Warning 10 warning : Linking two modules of different target triples: c:/users/evans/appdata/local/temp/tmp5ipexp/zlib_122.o' is 'le32-unknown-nacl' whereas 'c:/users/evans/appdata/local/temp/tmp5ipexp/Module.Launch.cpp_0.o' is 'asmjs-unknown-emscripten'
Warning 38 warning : Linking two modules of different target triples: c:/users/evans/appdata/local/temp/tmp5ipexp/SimulationController_136.o' is 'le32-unknown-nacl' whereas 'c:/users/evans/appdata/local/temp/tmp5ipexp/Module.Launch.cpp_0.o' is 'asmjs-unknown-emscripten'
Warning 43 warning : Linking two modules of different data layouts: 'c:/users/evans/appdata/local/temp/tmp5ipexp/libogg_139.o' is 'e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32' whereas 'c:/users/evans/appdata/local/temp/tmp5ipexp/Module.Launch.cpp_0.o' is 'e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128'
Warning 11 warning : Linking two modules of different data layouts: 'c:/users/evans/appdata/local/temp/tmp5ipexp/libfreetype2412_123.o' is 'e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32' whereas 'c:/users/evans/appdata/local/temp/tmp5ipexp/Module.Launch.cpp_0.o' is 'e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128'
The final warning
Warning 50 warning : incorrect target triple '' (did you use emcc/em++ on all source files and not clang directly?)
before the build errors out with the following message
Error 51 error MSB3073: The command "D:\\UnrealEngine\Engine\Build\BatchFiles\Build.bat HTMLTest HTML5 Development "C:\Users\Evans\Documents\Unreal Projects\HTMLTest\HTMLTest.uproject"" exited with code -1.
Error 49 error : bad use of setjmp, should only call it
I realise that HTML5 support is experimental, but I’m hoping someone can help me fix these errors and get a build working.
The latest version of emscripten 1.16.0 (via Web installer) is installed. I’m building from the 4.1 release branch. Would I get better results in the master branch?
Has anyone successfully compiled the Emscripten LLVM source using MinGW rather than VS 2010 SP1? I have VS 2012/2013 installed and honestly don’t feel like removing them both and installing VS 2010. MS recommends installing them in order by release…
Not sure if running those three in the same machine would cause any issues
I have compiled the editor(4.2) and tried to follow the explanation in . Also I have installed Emscripten. I could use an explicit explanation of how to get html5 to work. A movie would be great.
SwingNinja hasn’t really been fully optimized for HTML5 download footprint. I’d look at TappyChicken for the best example of a small web game, it is only 9 MB or so. We’re working on shrinking the engine footprint and improving our mobile and web examples!
Mike, I would just like to see how to get html5 to appear in my compiled version of 4.2. The explanation of Emscripten is totally convoluted. My subscription has run out. I would be happy to renew if I could get html5 to work.
Remember, HTML5 support in Unreal Engine is still a “preview”. It does work, but we don’t consider it fully supported yet because the developer experience is not to the quality level that we want, and documentation and samples are still actively being tested and improved. I asked a platform team member to chime in on this thread with info about using HTML5 with 4.2.
just been messing with html5 and 4.2.1, after a lot of head scratching and searching for various errors it finally packaged a game.
i tried with the car blueprint template, its 180 something mb, and doesnt seem to work in a browser.
firefox 64 bit nightly just says downloading… forever.
chrome just locks the whole computer.
im assuming html5 does actually work, is physics ect supported?
should i try something more simple?
no way do i want to make a 2d game in ue4, there are much much much better 2d specific engines for that.
Sorry for all of the workflow issues guys. There will be some improvements for 4.3 to the process, but not where it needs to be for easier use. Right now, I would suggest getting the master branch in the repo and building the editor. Make sure you have emscripten 1.16 installed and that the EMSCRIPTEN environment variable points to the install location (for instance C:\Emscripten\1.16) before building the editor. It will then properly build the HTML5 target libraries. In the built editor, enable the Game Launcher from within the Editor Preferences Experimental section. Open the Game Launcher window and in there, using the advanced icon, create a new profile (click on the +) and set the following:
Project: Your Project, Development, Test, or Shipping. Shipping will make the smallest js file, but it will still be around 70Mb. I have gotten this down in to the 30Mb range for Tappy Chicken by excluding unneeded third-party libraries, but I don’t recommend that initially.
Build: Check the Build box
Cook: Specify Cook by the Book in the drop down, select HTML5, and select your maps
Package: Select Package and Store locally, this is the step that generates the html file, you don’t need to specify anything for the fields in this section
Deploy: Select Copy to Device and create a Device Group. In the Group select your HTML5 (on a side note, I am planning to add “devices” for each of the browsers we detect on the machine so that you deploy and test on a particular browser)
Launch: Select Using Default Role.
If you are using code from the master branch, then it should generate the .bc, .js, and a .html in the <YourGameName>/Binaries/HTML5 directory. It will then try to launch it on a detected Firefox browser.
Launching in Chrome by double-clicking the html file will not working currently because of some cross-domain issues which I am still trying to fix. You will need to run a web server and serve the file. I usually use the python -m SimpleHTTPServer 8888 command running from within that directory
In the browser, make sure to load the developer console (F12 works in both Firefox and Chrome), this will provide additional output that may be useful, such as out of memory exception.
When you run into an error, post the output from the game log window and from the console, that will help us figure out what is wrong.
To answer the Physics question, yes we do support PhysX in HTML5, but not the Apex libraries.
There will definitely be many more workflow improvements as we move to 4.4. I know it has been slow coming, sorry about that.