Beyond Unity: How to Host Your Games on the Web
Here is a quick guide for uploading your games in WebGL format so that your friends and family (and the world!) can all play it online.
The great benefit of the WebGL format is that it allows you to package games (of a reasonable size) so that they can be played directly in your browser, without the need to download any files (which can trigger your antivirus program) and regardless of system software — PC vs Mac etc.
I covered how to export to WebGL in my last guide (Getting Started with Unity (Part 11: Build and Deploy Your Game!)) so here I will expand on that to cover the hosting process. Once you have your WebGL playable game folder zipped you are ready to go.
Step 1 is to create an account on a free games hosting platform such as itch.io.
Itch is a very popular platform for this specific purpose, and beyond allowing you to share your game with friends and family can also help you get wider visibility and distribution for your game as well. Go ahead and create an account and then head to your dashboard.
If you already have any games hosted, your creator dashboard will show your uploads, allow you to edit your public game pages at any time, and show metrics on the visibility of and engagement with your games.
In your creator dashboard, click the pink button for “Create new project”. Here you can enter the details of your game including the title, tagline, description, cover photo, type of game, and pricing (if applicable). Once you have filled in your details, under “Kind of project” select “HTML”, and then select “Upload Files” and upload your zipped WebGL folder. Itch will automatically recognize the files within that folder.
Lastly, choose the display dimensions for your game (I find 960 x 600 works well for a 16x9 game). Save your changes and this will bring up a preview of your game. Go ahead and take it for a spin to make sure it plays as intended, and then return to your page view to set the visibility to public. Now you can share the link for your game and anyone can play it from that link. Cool, right? Enjoy!