Integration Guide
Integration Guide
Contents
Overview
Method 1. iFrame Embedding
Method 2: JavaScript Embedding
Appendix: Troubleshooting
Overview
This document provides guidelines for integrating Teuteuf web games onto
your website or web application. Two primary methods are covered: iframe
embedding and JavaScript embedding.
Our games are developed using a mix of HTML, CSS, JavaScript, and other
web frameworks including React and Angular depending on the title. Once
the game is on your site it can be played within the context of a web page.
The game resides on our web server and is accessed through a web
browser by end-users. You can also use CSS to style the game, such as
changing the border colour or rounding the corners.
Step by Step
a` Copy the iFrame Code
Obtain the iFrame snippet from Teuteuf Games once a partnership
agreement has been signed
<iframe src="https://teuteuf-worldle-
widget.pages.dev/" style="height: 100%, width: 100%,
border: 0"></iframe>
Step by Step
ki Include a Script Tag
A <script> tag is added to your website's HTML, pointing to a JavaScript
file that contains the necessary code to load and display the game. This file
will be hosted on our CDN, the Teuteuf Games server, The tag might look
something like this:
<script src="https://example.com/path/to/game-
loader.js"></script>
id User Interaction
Users can interact directly with the game elements that are part of the
DOM. The JavaScript code handles user inputs such as mouse clicks,
keyboard presses, or touch gestures to provide interactivity.
d Asset Loading
The JavaScript may load additional assets (such as images, sounds, and
animations) dynamically as needed. This is usually done via HTTP requests
initiated by the JavaScript code.
¾d Event Handling
The embedded JavaScript listens to various events, like user interactions or
timing events, to progress the game, render the next frame, or trigger
specific actions within the game.
äd Responsiveness
Our embedded JavaScript games are designed to be responsive, meaning
they can ad ust their size and layout depending on the user s device and
j '
<div id="game-container"></div>
<script src="https://example.com/path/to/game-
loader.js"></script>
<script>
GameLoader.load('game-container', {
width: 800,
height: 600
});
</script>
Performance
JavaScript embedding can be more performance-optimised as it avoids the
overhead of an iframe.
Appendix: Troubleshooting
Troubleshooting iframe issues can involve checking for syntax errors,
ensuring proper cross-origin permissions, adjusting responsive design
settings, and debugging with browser developer tools. Always consider the
latest best practices and browser compatibility as you work through these
solutions.
Appendix: Troubleshooting
Appendix: Troubleshooting
Appendix: Troubleshooting
Appendix: Troubleshooting
Appendix: Troubleshooting
General Tips
X Keep your integration code updated with the latest versions provided by
Teuteuf GamesS
X Regularly test the game integration after updates to your website or
after Teuteuf Games releases updatesS
X For advanced issues, reach out to Teuteuf Games support with details
about the problem, please include browser console logs, and steps to
reproduce the issue.
Additional Support
By following this guide and using the troubleshooting appendix, you should
be able to integrate Teuteuf Games' web games into your site and address
common issues that may arise. For additional support, please contact
[email protected].