SEARCH

Menu

Menu

Runtime

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

Implementing Puls Runtime Events in Unity is straightforward, thanks to our dedicated developer community, which created the Puls SDK for seamless integration into your game. Download the Unity package from our GitHub.

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.


// index.html

engine.startGame({
  'onProgress': function (current, total) {
    if (total > 0) {
      statusProgressInner.style.width = `${(current / total) * 100}%`;
      
      // Loading progress
      // ---
      // While the engine is loading and initializing
      // pass the progress into puls to display the current progress.
      window.puls.loading(current / total * 100);

      setStatusMode('progress');
      if (current === total) {
        setTimeout(() => {
          setStatusMode('indeterminate');
        }, 500);
      }
    } else {
      setStatusMode('indeterminate');
    }
  },
}).then(() => {
  setStatusMode('hidden');
  initializing = false;
  
  // Starting session
  // ---
  // The godot is loaded and initialized, now
  // you can start the player's session.
  window.puls.start();

}, displayFailureNotice);
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.

Platform Information

To access information about the platform on which the Puls Runtime is running, use our platform module available at window.puls.platform.


// Check whether game is running on Puls Mobile App
window.puls.platform.isMobile: boolean

// Check whether game is running on Puls Web App
window.puls.platform.isDesktop: boolean

// Get the users prefered language
window.puls.platform.language: string

Notes

Please note that implementing Puls Events is a required step to ensure the correct functionality of your game on our platform.

Notes

Please note that implementing Puls Events is a required step to ensure the correct functionality of your game on our platform.

Notes

Please note that implementing Puls Events is a required step to ensure the correct functionality of your game on our platform.

Version 1.2.0

Need some help? Discord

Version 1.2.0

Need some help? Discord

Version 1.2.0

Need some help? Discord

Copyright belongs to Puls Company s.r.o. All rights reserved.

Puls Company s.r.o © 2025