LogoPixi’VN

itch.io

You can distribute your game on itch.io. It is a platform that allows you to upload your game and distribute it to the public. It is a great platform to distribute your game and get feedback from the community.

Game playable in browser

On itch.io you can enable the "This file will be played in the browser" flag for an uploaded file to make it playable in the browser.

But only a single html or js file can be executed and not a directory. For example, if you upload a zip of the generated folder after a build, you will see a result of something like this:

image

The solution is to host the game on a server and then create an iframe on itch.io to show the game.

For example, after hosting the game on a server, you can create a index.html file with the following content:

index.html
<!doctype html>
<html lang="en" style="height: 100%; width: 100%;">
  <head></head>
  <body
    style="height: 100%; width: 100%; display: flex; overflow: hidden; margin: 0; background-color: #242424;"
  >
    <div id="root"
      style="height: 100%; width: 100%;"
    >
      <iframe
        src="https://pixi-vn-react-template.web.app/"
        style="height: 100%; width: 100%; border: none;"
        allowfullscreen
      >
      </iframe>
    </div>
  </body>
</html>

Then you can upload the index.html file to itch.io.