SEARCH
Puls Events
Required
Your game runs on top of the Puls Runtime, which provides platform functionalities that you can interact with.
When your game is hosted on Puls Games, it must inform the platform runtime that it is ready to be played and initialize the player's session. To do this, you have access to the window.puls
object and can call its methods.

Loading Progress
To display a loading progress bar while your game is initializing or loading its resources, you can call window.puls.loading(progress: number)
, where the progress value ranges from 0
to 100
. This will render a progress bar with the given percentage progression on the loading screen.
Starting Session
After your game is loaded, preferably on the main menu screen and ready to be played, call window.puls.start()
to initiate monetization and start the player's game session.

Engine-Specific Integration
The following sections provide generic guidance on integrating Puls Events with popular game engines.
Unity
Calling Puls Events in Unity is possible in the generated index.html
file, where the Unity Engine is loaded and initialized. This is a good place to pass the loading progress into the window.puls.loading()
function. After the engine is successfully loaded, you can call window.puls.start()
to start the session. This function can also be called from C#, depending on your preference.
Godot
Calling Puls Events in Godot is possible in the generated index.html
file, where the Godot Engine is loaded and initialized. This is a good place to pass the loading progress into the window.puls.loading()
function. After the engine is successfully loaded, you can call window.puls.start()
to start the session. This function can be called either from the index.html
file or from within your Godot project, depending on your preference.
Others
Puls Events are platform-agnostic and can be used with any game engine that runs on the web. The key is to enable communication between your game engine and the web platform. While Puls Events are not crucial during development, as they don't affect game functionality, you will need to integrate them after exporting your game. Simply add the Puls Events to your index.html
file or use a method that suits your game engine.