BENTOTILESSDK DOCS
Game Engines

Phaser 3 Integration

Learn how to connect your Phaser 3 game to the BentoTiles SDK.

Phaser 3 Setup Guide

Integrate the BentoTiles SDK into your Phaser 3 game using our scene plugin module.


Phaser Plugin Implementation

import { BentoTilesPhaserPlugin } from './BentoTilesPhaserPlugin';

const config = {
  type: Phaser.AUTO,
  width: 800,
  height: 600,
  plugins: {
    global: [
      { key: 'BentoTiles', plugin: BentoTilesPhaserPlugin, start: true }
    ]
  },
  scene: MyGameScene
};

class MyGameScene extends Phaser.Scene {
  create() {
    this.plugins.get('BentoTiles').init({
      gameId: 'my-phaser-game'
    });
  }

  onGameOver() {
    this.plugins.get('BentoTiles').commercialBreak(
      () => this.scene.pause(),
      () => this.scene.resume()
    );
  }
}