Manual: Exporting to HTML5 (Web Browser)

This manual explains how to export your project in HTML5 format and play the game in a web browser.

Output Process

The output method is the same as on Windows PCs.

  1. Open the Export Window via Project > Export in the menu.
  2. Select the Add… button and add Web.
  3. While there are detailed settings, you can usually proceed directly to Export Project without major issues. (The settings are quite granular, so we will skip explaining them here.)
  4. Compress the output files and upload them to your desired hosting site.

Precautions Before Output

If the audio default_bus_layout is not located directly under res://, the output may not function correctly. This is an issue specific to the Web platform.

Please ensure the following file exists directly under res://:
image
If it does not exist, change the bottom panel to Audio, and create default_bus_layout.tres by selecting Save As… or Create.


If clicking the Load Default button results in no changes, the settings have been applied correctly.

Some features exclusive to Forward+ will not work.

Specifically, this affects the Trail and Subemitter features available in particle settings.
This is because Forward+ is not supported on the Web, forcing the export to use the “Compatibility” mode.
You can still export successfully even if Forward+ is enabled, but when checking details carefully, switch the renderer to “Compatibility”.

Adjust the screen size appropriately.

Web performance is generally heavier than desktop performance, and high-resolution games may suffer from poor performance.
Additionally, the game will be accessed in a wide variety of environments, including by users on smartphones.
It is recommended to set the Stretch Mode in Project Settings > General > Display > Window to Viewport or similar.

If you want the game to be playable on smartphones, prepare a virtual pad or buttons.

Smartphones typically do not have keyboards or controllers. Although it requires some GDScript, we recommend implementing virtual pads or on-screen buttons.

Posting Settings: itch.io

There are two key points to note when posting to itch.io:

  1. Name the file index.html (the default is GameName.html, so please change it).
  2. Enable SharedArrayBuffer. (Without this, Godot-based games will not function.)
    image
    If the game still does not work, please check the default_bus_layout mentioned above.

Troubleshooting

BGM/SE restarts from the beginning mid-playback.

In the project settings,
→ Audio
→ General
→ Default Playback Type.web
Changing this to Stream may resolve the issue.