Deploy Godot Web Build on itch.io
This is something I’ve recently done for this website. Wanted to write a brief guide while it’s still fresh on my mind. You can see the working final result on the Godot LookAtModifier3D Prototype page.
If you have a Godot project, ideally using the Compatibility mode that supports web platforms better than Forward+ and Mobile modes, it is very convenient to host it on itch.io. Here’s how.
Please note that this is for Godot 4.
Limitations
Before we begin, you need to make sure your project fits within the limitations of itch’s embedded web distribution. At the time of writing this post, these were:
- The ZIP file you upload can’t have more than 1000 files after extraction;
- File names need to be maximum 240 characters;
- Total size of extracted files can’t exceed 500 MB;
- Individual files can’t be larger than 200 MB;
- Filenames are case sensitive and need to be UTF-8.
If that all sounds good to you, let’s start. And if not, you can always publish it as a downloadable project instead.
Export Project
Assuming this is the first time you’re building a Godot web build, go to “Editor” -> “Manage Export Templates…” and install either from a file or by simply clicking on “Download and Install”.
If you’re seeing the message “Export templates are installed and ready to be used”, you can proceed to “Project” -> “Export…”.
Select Web on the left and name the export path “index.html”. Feel free to adjust settings as needed. You can now click on “Export Project…” and select a destination.
Create the Zip File
With your project built, zip all the files generated. Make sure every file is in the root of the zip.
Upload Project
You can now go to your itch account and click on upload new project. Choose HTML as “Kind of project”, “embed in page” for embed options, then enter your desired viewport dimensions. Enter all the remaining details, upload your zip, and publish as you please.
Embedding
If you’d like to embed the game somwehere else as I’ve done on this site, go to the “Distribute” tab (it’s to the right of the “Edit project” tab), select “Embed game” on the left, and use the generated iframe tag on any page you want. You can also style the iframe element to make the game responsive.
Conclusion
And that’s it. I find it useful that itch handles all the hosting hurdles, since having multiple games on a website can quickly fill up your hosting space or limit your creativity as you opt for smaller bundles, sacrificing visual fidelity. Not to mention all the additional benefits of being on such a robust indie game platform.
