Canvas Size and optimizations for HTML5 in 4.7.2

Hello there, I’m having issues with the binary packager of HTML5 in 4.7.2

I have already installed emscripten and manage to get a build for my game, but I get the canvas size to big and the script crashes on firefox 64-bits.

How can I change the canvas size and optimize my project to work? Also: what are the differences with the ue4game build and the u4data files for an HTML5 project?

Hey ,

Thank you for your question. I have sent requests to our HTML5 developers for additional information that I could provide you. I appreciate your patience. If you have any further questions, please feel free to reply to this thread.

Thanks!

Ty , I’ll be on the look out, I thought I was forgotten!

Hey ,

I have heard back from our HTML5 developers and they’ve given a bit of information for you. Recently, a question similar to yours was answered on the forums. You can view that [here][1]. You can also search in AnswerHub for any similar questions as well.

However, they weren’t too sure by what you meant when you said “canvas size is too big” and you referred to a crash. With that being said, we will need a callstack from you. There should be some information within the Console of both browsers (Ctrl+Shift+J) and the game as well (the text box below the game canvas).

Please provide as much information as possible, so we can help you resolve this swiftly!

Thanks!

Change resolution - Platform & Builds - Epic Developer Community Forums

Hey ,

Thanks for providing me with the screenshot. Have you already tried [this option][1]? There is also a post on the forums in the link I originally sent you made by Trelobarbouni which resolved 's HTML5 trouble. Have you tried his suggestion? Which is:

“Firstly, go into your Unreal Projects folder and find your project, open a folder called “Binaries”. There you should find an other folder called “HTML”. Open it and you can find your preject’s .html file. You can open it with Notepad and edit below “div#display_wrapper” the -width. Also you can go to “” and under that you can change your height and width settings. You can find and edit a lot of interesting stuff in this .html file, but the disadvantage is that if you rebuild-relaunch your preject your settings will be lost.”

Hopefully one of these options does help resolve the issue you are experiencing. If you’ve tried both of these suggestions without any luck, let me know and I’ll ask for additional assistance from our developers.

Thanks!

How can i change game's resolution in blueprints - Blueprint - Epic Developer Community Forums

No no, I mean the game canvas size inside the browser, the game screen is just too big:

This makes my browser to crash the plugin. By editing the html file on notepad. I can change it, but it won’t optimize either the game at that size: say 800x600. I want to finish this game to upload to kongregate and other third party websites.

So, that’s my problem. I’m using really low poly models (150 polys the heaviest one) so that can’t be. The shaders/materials aren’t complex either

I already have Sam, those methods didn’t work, that’s why I opened a new question :slight_smile:

Hey ,

Thank you for clarifying for me that those methods didn’t work with your specific issue. I have submitted a request to our HTML5 developers for additional assistance. Please allow a couple of business days for a response. If you haven’t heard from anyone, including me in a couple of days, please respond so that I can follow up with the developers.

I greatly appreciate your patience with this matter and hope that the canvas size issue will be resolved soon! :slight_smile:

Heya Sam! Any news on this one? :smiley:

Hey ,

I have heard back from the developers. Unfortunately, the developers aren’t sure how the project is causing your browser to crash because the whole HTML5 platform is there because it runs the game within the browser without any plugins. They also noticed that from your screenshot, it looks as if you’re running the game in shipping mode. Before we’re able to assist you further, we need you to do the following:

Run the game in development mode, confirm that it still doesn’t work. When it doesn’t work, please provide us all of the contents of the text box which comes below the game canvas. Also provide all of the contents of the browser console as well.

Thank you! :slight_smile:

Well, I can’t make it work, I couldn’t even manage to get the console working, can a output log from the build do the job?

Hey ,

Please provide as many as possible, and I’ll submit them to the developer and see if they can decipher anything from them. Keep in mind that they did ask for specific for a reason though.

Another suggestion is to private message me on the forums and provide me a link to your full project so we can test it out on our end.

Let me know what you plan on doing, so I can let the developers know. Thank you. :slight_smile:

Hey Sam! I’m sending ya over the project itself so you can run it. I think that’s the best course of action

Hey ,

We have been able to load and run the game on 64bit. Please go to https://get.webgl.org/ to see if webgl runs on your browser. Also, you may want to get the latest version of .

We did notice that there are missing shaders in your project however, we feel that this is because your shaders are likely not set to es2 compatible.

Thank you!

Well that site: It does run, so I don’t know what may be the problem. What shaders are compatible with ES2? I’m using DDY and DDX to remove normals from the landscape module, are those missing?

Question: what about common folks? I’ll need to to be able to run in any single spec, I can’t pretend to ask them to download the version of firefox 64 bits.

Hey ,

DDY and DDX are not ES2 compatible. We suggest that you run your game in mobile preview when testing out the development of your game before packaging. That way, you can see what is working and what is not working.

For your reference, within our [documentation][1] it does state that currently a 64-bit browser is required to run HTML5 builds.

However, when you release your game, you can include in the system specifications which browser the game will run on. I did verify that HTML5 games are suppose to be working on FireFox 32-bit as well, not only .

With that being said, I have entered a bug for our developers to review. If for any reason you need to reference this report in the future, please refer to: UE-13924

Thank you!

Sharing and Releasing Projects for Unreal Engine | Unreal Engine 5.1 Documentation

Ok! Thank you, even so, I was running on Firefox 64 bits this whole time. Not the version tho’

One last thing: IS there any other way to disable smooth groups from terrain then?

Hey ,

Sadly, this isn’t my expertise area therefore, I sent a request last week to the developers asking if there was another way to disable smooth groups from terrain. I have not yet heard back and I also do not know of another way to accomplish this unfortunately. With that being said, I did search through our documentation and found this bit of information, but I do not believe it’s exactly what you’re looking for but hopefully it will help a bit. Once a response is made to my request, I will update this thread with that information.

  • [Unreal Documentation][1]
  • [Unreal Forums][2]

Thank you!

Skeletal Mesh LODs in Unreal Engine | Unreal Engine 5.1 Documentation
[2]: https://forums.unrealengine.com/archive/index.php/t-2759.html

Hey Sam! Thank you for response, I’m trying to find a turn around right now, I’ll let you know what I manage to solve :slight_smile:

Hey,

Sounds perfect, I’d love to know as well. I’m sending a follow up to the developers as we speak. :slight_smile:

Cheers!