Phaser runtime is an application to run Phaser 3 games on desktop. Phase Runtime works with Electron.
The project must be a directory that contains a package.json
file with the window
configuration according to the Electron BrowserWindow documentation and the main script file with Phaser code.
You can import modules using the require
function.
You must have to use __dirname
to refers to the game directory
The browser
object refers to the current Electron BrowserWindow object. It's equivalent to require('electron').remote.getCurrentWindow();
Game directory
Build A Game With Phaser On Mac Windows 10
Build mobile HTML5 Games with Phaser. Andrzej Mazur, @end3r This slide deck is using the shower system - roll over the previews to see the notes and click any slide to go into presentation mode. Then use keys to navigate. Go fullscreen. Learn how to build simple mobile 2D HTML5 games using the Phaser framework.
myGame/package.json
Build A Game With Phaser On Mac Pc
You can generate a package.json
with npm init
command
myGame/index.js
Running the game
Build A Game With Phaser On Mac Pro
To run the game, enter phaser
inside the 'myGame' directory.And you will see it