Embed Your Godot Game On Your Website

May 12, 2020by Mikael Hernvall

Likes

Gotm provides multiple ways for you to easily embed your Godot game on another website.

You could even embed it on other sites like Itch, letting you enjoy the benefits of both Gotm and Itch.

How To Embed Your Godot Game

Go to the Advanced section in your Godot game's dashboard. In the Embedding card, you'll find a small snippet of HTML code.

Paste the code snippet where you want it into your website's source code, and you're done!

By default, your embedded Godot game shows its entire page. Click the Fullscreen in your dashboard to generate a code snippet that makes your game cover the whole area.

How To Embed Your Godot Game On Itch

Embed on itch Host your game on Gotm, embed it on Itch.

Godot games hosted on Gotm enjoys high performance and low loading times. You can benefit from Gotm's advantages and have your game accessible on Itch at the same time.

Save the code snippet below as a .html file and upload it to Itch.

<html>
  <body style="display: unset; margin: unset;">
    <iframe
      style="width: 100vw; height: 100vh; border: unset; position: fixed;"
      src="<URL_TO_YOUR_GAME>?forceFullscreen=true"
    ></iframe>
  </body>
</html>

For example, the game at https://gotm.io/macaroni-studios/block-dasher would have the following code.

<html>
  <body style="display: unset; margin: unset;">
    <iframe
      style="width: 100vw; height: 100vh; border: unset; position: fixed;"
      src="https://gotm.io/macaroni-studios/block-dasher?forceFullscreen=true"
    ></iframe>
  </body>
</html>

Here's what it looks like: https://gotm.itch.io/embedding.