Query on Load Percentage and Mouse handling

Hi,

I have 2 queries. Can anyone help me out with these queries?

1 - How to add a loading screen which shows either “wait time in seconds or minutes” or loading “percentage”? To be more specific how to derive this “percentage or time” to load?

2 - My first person game uses standard keyboard and Mouse input. Mouse is used to look around. Problem is, rotation stops the moment mouse reaches left or right edge of browser thus restricting the complete 360 rotation(even in Full screen). How to make sure I get complete 360 rotation?

Thanks in advance

For your first question… As the engine is not initialized yet while the download continues, it is not possible to do something in UE4… not without writing something in JS.

First you need to write something that is capable of viewing multiple progress bars, as the promise system downloads multiple files at once.
The original html file that is created on packaging uses jquery (what a waste of memory and cpu) for creating promises that use jquery’s ajax.
You can override the current onprogress method and direct your percentage to your own progress bar.

If you want to track the download of the memory and data files, you need to check Module"setStatus"], as this is called while emcc’s generated js downloads the file.

Code is there, for my taste, a little badly written but is readable and can be easily change.

For a proof of concept, you can check this one out:
It is not finalized yet, but you’ll see what is working how. (Check http://world1.thekid.com/js/game/game.js for some more details, or simply hack your way around in js files).

For the second part, you need to force focus to the canvas (which ue4 will do automatically). You might be missing the popup that is saying “this page is trying to take control of your mouse”… Refresh the page you’ll see it.

Thanks for that information. I will look into that coed and let me try to come up with something to indicate the load percentage and time remaining.

With regard to second query on Mouse handling, I do get the pop up message and the game goes into full screen mode but Mouse problem exists. Now if I press escape and again chose for full screen, then it works. So not able to figure why mouse works perfectly in the second attempt but not in the first.