Download

Upload HTML5 game to Itch.io

Hi!
I’m a 3d artist and I’m currently trying to upload a game I made to Itch.io. I chose this website because I understood that they are hosting the game files directly on their servers (and mostly because I’m a big noob in html and programmming in general …) and I’ve seen this cool project https://katanec.itch.io/rest-house so that’s also why I chose itch.io.
I can make my project and the first person template work when testing locally using the HTML5LaunchHelper.

I followed the guidelines on this page https://itch.io/docs/creators/html5, so I renamed my .html file to index.html and put everything in a ZIP archive but the game simply won’t load in Chrome and Firefox and I get a ScriptError on Internet Explorer. I tried to upload my game but I also tried with the First Person Blueprint blank project… so I don’t think the problem come from my game.

I also tried to follow the advices on this thread https://forums.unrealengine.com/showthread.php?93711-how-to-make-my-html5-game-accessible-online. So I uncompressed all the archived .gz files, modified the .html file and removed all the .gz references in it, rename again my .html to index.html, put everything in ZIP and upload it again, but I’m still stuck with the same problems.

I really don’t know what to do.

I’m turning to you Unreal wizards!

Have a good day!

Sibaiur

Same as you, I hope someone could help, there are already projects on ith.io with HTML5 games working, so we know it’s possible.

Well, the projects that are working on itch.io are using 4.8, so maybe that is a clue.

Here is a project showing the same problem I have: https://eyesiah.itch.io/mammoth-web

Hi,
After contacting itch.io, they told me that since they “force HTTPS, any external assets must be referenced by HTTPS. Or you can include them directly in the zip”
So I just opened my .html and replace http by https in the line 7,8 and 9 so I ended up with this:

    <script src="http**s**://code.jquery.com/jquery-2.1.3.min.js"></script>
<script src="http**s**://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<link href="http**s**://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">

And now my game load and launch.
Hope this can help you.

I’ll try it right now!

Edit: I got a “Too many files in zip” error.

Now it says: “One or more downloads failed! Please refresh this page”

It works… IT WORKS!!!

All right, here is the ultimate guide to have HTML5 games on itch.io:

-Package your project as normal, make sure that it only has one level because level changing/traveling doesn’t work very well.
-Unpack all the .gz files.
-Rename the .html file to index.html.
-Open it with a text editor like Notepad or Notepad++ (the one I used).
-Search all the .gz and delete them, there are 5.
-There are 3 links at the start, change http to https.
-There is a line that says: filehostargument = "’ -filehostIp=http:// I didn’t change it and it works, but it also works with https.
-Zip everything except “Readme.txt”, “HTML5LaunchHelper.exe” and “RunMacHTML5LaunchHelper.command”. It doesn’t matter the level of compression, I chose Ultra in PeaZip.
-Upload the zip file to itch.io and check “This file will be played in the browser”.
-I got a “Too many files in zip” error which I fixed by moving the zip up to the top, making it the first file and being sure is the only one with “This file will be played in the browser” checked.
-Play around with the viewport dimensions, depending of what you choose the game will be displayed differently.
-Save and check your page, it should load it.

Thank you very much Sibaiur for this!

I want to add something about level changing/traveling.

It works for me when I add the levels manually through the “Packaging settings” but not as well as having only one level for package.

Just test it.

Glad this helped you! And thanks for writing this guide!

No problem, it’s a pleasure!

Now it’s time for us to upload hundreds of awesome games to itch.io and fill it with UE4 goodness :smiley:

Just wanted to say thanks to you guys for the help I am now able to deploy to itch.io

When you say: “search all the .gz” you mean the gz references in the HTML file or the .gz in the folder? Incluiding the Utility.gz? Because I’m not sure what exactly I must delete in the HTML file, care to share a screenshot?

I mean the references in the HTML file, there are five, remove the .gz.

Example: If you find blablabla.gz remove the .gz and leave blablabla and there is a line where it says blablabla “.gz” remove the .gz and leave the quotes like this blablabla “”.

If want to do it the easy way just use “find and replace”, write .gz and click “replace all”, it will remove all the .gz’s.

The gz files that you actually have in your folder you need to extract them.

I get this all the time. I did, step by step as you said.

904d28c98101f00d48da4853310762f0ec0899bc.png

I’m afraid I can’t help with that.

If I were you I would package one of the templates without changes and test it, it should work.

Are you able to use the keyboard while playing the from the itch.io page? I can interact with the mouse, but no key inputs are processed.

Solved: in addition to [FONT=Courier New]s/http/https/ as suggested by @Sibaiur, I added - immediately following the line [FONT=Courier New]<script …> - the following 2 lines to force the focus to the game window (source https://www.reddit.com/r/gamedev/comments/39shqa/itchio_and_unity3d_webgl/cs63emc):



window.onload = function () { window.focus(); }
window.onclick = function () { window.focus(); }


That solved the issue with the missing key inputs.

I know this thread is over a year old…but I was hoping someone could help me. I followed the guide posted by Masterneme, but there was one line that confused me:

“I got a ‘Too many files in zip’ error which I fixed by moving the zip up to the top, making it the first file and being sure is the only one with ‘This file will be played in the browser’ checked.”

I don’t know what he means by moving the zip to the top, since you can only upload a zip file. Is there a zip file within the zip file?