Game freezes on HTML5 build

I’ve created a project which works well when packaged to windows. However, when packaging the project to HTML5, the game seems to be locked at frame 1 (with some really strange coloring).

This is the post I did about it before: Paper2D HTML5 Camera not working properly - Cinematics & Media - Unreal Engine Forums
By removing the camera on the player, I successfully “fixed” the camera issue but there’s still the frozen issue.

There seems to be some kind of bug that freezes the screen as I’ve tried several different methods to try and solve this issue. The game still works in the background as you can hear the sounds of picking up items. My project files are in my last thread if you want to check them out. I’ve tried both Perspective and Orthographic camera, it doesn’t change it. I’ve stripped out a lot of unneccessary blueprints to no vain.

Here is a picture of the project in unreal editor:

This is what it looks like when played on html5:

Hey,

I was unable to download your project from the link provided in your last thread, would you be able to upload your project once again for me to look at further?

Looking forward to hearing from you, thanks! :slight_smile:

Hey there !

Here is a new link. Hope it works! :slight_smile:
http://www.filedropper.com/game_1

Hey,

When I opened your project, I made sure my engine scalability was set to epic. I rebuilt your lighting and then I proceeded to package the game for HTML5. This is how it looks on my computer.

Is this lighting too dark for the project you’re creating? Or is this more of the effect that you’re looking for?

Looking forward to hearing from you. :slight_smile:

Hey ,

The lighting in that picture is far too dark from what I want to achieve - I basically want standard colors of the assets. I still haven’t figured out the lighting in the engine, as I’m still very much a rookie at it, but I sort of thought the same image from the viewport was how it would look as it did so when I published it to an .exe file. :slight_smile:

Hey,

I have a developer reviewing the lighting issue with your project. One of us will comment back later once we have an idea of what’s going on. By the way, which browser did you launch your project on originally? I’m using .

Looking forward to speaking with you soon, thanks! :slight_smile:

Dorial - Can you try running the game in mobile preview and see if the colors match (or not)? HTML5 follows the mobile rendering pipeline. Another thing which I noticed that your textures are not power of 2.

Thanks,

Dorial - Ok - Looks like its an sRGB issue. To work around you can edit DefaultSprite material and add a power( color, 1/2 ) node ( using a featurelevel es2 switch) to bring back the right color. The colors look correct with this fix.

Thank you very much for your answers! I will try to answer them all and my discoveries so far:

I’m using firefox and . The camera seems quite normal on the mobile preview (except for maybe a texture or two). A friend of mine tried the project and it works for him, minus the colors. The controls are working for him but not when I package it. When I installed emscripten, Unreal could not open any project and crashed every time I tried. After restarting my computer, it worked however. This might be the reason it bugs out. I tried replicating it (uninstalling and reinstalling emscripten) and I get the error again. Here is the start of the error message, I can’t link the whole of it because of the character restriction:

Access violation - code c0000005 (first/second not available)

Assertion failed: ::GetEnvironmentVariable(TEXT(‘PATH’), PathVariable.GetData(), PathVariable.Num()) == PathVariable.Num() - 1

This is how the DefaultSprite looks like. It’s not really working as it is right now so any pointers on how to solve it would be awesome

I’ve solved it. The crashing itself seems to be fine after re-installing firefox. Still get the error when installing Emscripten but it doesn’t seem to affect anything (from what I know). The colors were fixed by changing the compression settings on the .png files of the sprites. They were set on TC_Default and by changing it to TC_UserInterface2D, the colors return to normal in HTML5… All but one texture but I’ll find my way to fix that.

Pictures underneath if someone else has this problem! It might save you some time.

TC_Default:

TC_UserInterface2D in the list: