Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Getting HTML5 to work on Chrome

I managed to get a project to work on Firefox (both standard and Nightly), but whenever I run it on Chrome the "Downloading..." bar fills up and then it hangs and nothing happens. However, Tappy Bird does work on Chrome, which means it should be possible. What do I need to do to get this working?

Product Version: Not Selected
more ▼

asked Aug 28 '14 at 08:09 AM in Packaging & Deployment

avatar image

6 2 4 6

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

For things to work on chrome, the files need to hosted behind a web server, chrome doesn't like direct file system access. http://stackoverflow.com/questions/6060786/file-url-cross-domain-issue-in-chrome-unexpected.

more ▼

answered Aug 28 '14 at 05:56 PM

avatar image

[Ankitkk] STAFF
481 13 3 9

avatar image [Ankitkk] STAFF Aug 28 '14 at 05:58 PM

if things happens on time, this shouldn't be an issue for the next release were we always host files via a built in webserver.

avatar image alexstoinescu Aug 28 '14 at 08:58 PM

I did open the game through XAMPP.

avatar image [Ankitkk] STAFF Aug 28 '14 at 10:07 PM

Could you post some other information - console output? Could you also try on Chrome beta - https://www.google.com/chrome/browser/beta.html

avatar image EvilMind Sep 01 '14 at 02:38 PM

I'm in the same situation as alextoinescu. I run my project through Apache and it works on Firefox, but when I try to run it on Chrome (36.0.1985.143 m) the browser stops right after the 'Downloading data...' bar gets completed.

The Javascript console shows this error: Uncaught RangeError: Invalid typed array length in localhost/UE4Game-HTML5-Shipping.js.

This is where the code breaks: HEAP8 = new Int8Array(buffer);

avatar image EvilMind Sep 02 '14 at 09:05 AM

Thank you Ankitkk. It worked. Now Chrome and Firefox run our project.

avatar image youthnick Apr 17 '19 at 07:04 AM

how did u soveld this ?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

That particular error is to do with chrome not able to completely allocate the total memory required.

So, for HTML5 - we have to allocate all the memory the game is going to use before hand. 32 bit browsers can only provide that much.64 bit browsers can provide a lot more. this done through setting Module.TOTAL_MEMORY in the Game.html page.

either you can edit that value or set right amount in HTML5Engine.ini file ( BuildSetting ). Look at HTML5Platform.Automation.cs line 68 on how that value is set during packaging.

For 32 bit browsers - The most i have seen safely being allocated is 512 MB. if your game needs more than, I would think you are out of luck for 32 bit browsers. You might want to cherry pick this changelist to clamp values automatically for 32 bit browsers.

I think, You should do some experimentation and actually figure out the high watermark for memory usage - discussion about emscripten memory profiling and use that number in the .ini file for your HTML5 builds.

more ▼

answered Sep 01 '14 at 03:27 PM

avatar image

[Ankitkk] STAFF
481 13 3 9

avatar image DarkHope May 17 '15 at 06:54 PM

Hey Ankikk, i got a problem my project " http://hg2d.net/vitualisation/HTML5/Package.html " dont work on chrome / maxthon browser.

I change .TOTAL_MEMORY in .html 1Go too 3Go for the test but dont work.

when i go in HTML5engine.ini at buildsetting i saw that :

[OnlineSubsystemMcp] benabled=false

[SystemSettings] r.setres=800x600

[BuildSettings] HeapSize=1024

[HTML5DevicesWindows] Firefox Nightly (64 bit)="C:/Program Files/Nightly/firefox.exe" Firefox Nightly (32 bit)="C:/Program Files (x86)/Nightly/firefox.exe" Firefox (32 bit)="C:/Program Files (x86)/Mozilla Firefox/firefox.exe" Firefox Aurora (32 bit)="C:/Program Files (x86)/Aurora/firefox.exe" Chrome="C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"

;all browsers on mac are 64 bit, 64 bit browsers can allocate more than 512MB of memory to around 1.5 GB. [HTML5DevicesMac] Safari="/Applications/Safari.app/Contents/MacOS/Safari" Firefox="/Applications/Firefox.app/Contents/MacOS/firefox-bin" Firefox (Aurora)="/Applications/FirefoxAurora.app/Contents/MacOS/firefox-bin"

[HTML5DevicesLinux] Firefox="/usr/bin/firefox"

[HTML5SDKPaths] Mac="/path/to/emscripten/sdk"

if i follow your advice i have to change Heapsize ... but i dont understand with what.

Can you help me ?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question