How to integrate Construct 3 game in Django

Sumedha Gn
Oct 22, 2021

The solution is very straightforward.

  1. Place your Construct 3 game in your static folder.
  2. In the desired HTML page, place the index.html (of your Construct 3 game) file directory in the src of an iframe.
  3. Adjust height and width of iframe accordingly.
  4. That’s it!

Example:

<iframe src="{% static 'construct3/game/index.html' %}" title="Integrate Construct 3 game in Django" width="400" height="600">
</iframe>

*Note: If you are integrating multiple of the same/similar games, remember to change the name of the game when exporting from Construct 3. Else, Django will not be able to identify the respective games.

Hope this helps! Happy coding!

--

--

Sumedha Gn

Documenting errors I’ve faced so you can save time trying to resolve them, feel free to let me know how I can improve too!