How do i run a game on Phaser?

So I have a web server, MAMP for windows 10. its root is the game’s directory. I have the phaser.min.js, game.js, and index.html, but when I run the index, I even configured it to use the phaser.min and game.js, but I should get a black screen, but I get a white screen. and I use inspect element and the only thing there is index.html, how do I get this working? I could send the folder, but new users are not allowed to send attachments (┬┬﹏┬┬).

1 Like

are you loading phaser.min.js and game.js inside index.html? You can check console and network tab in dev tools for more info/errors.

Also refer (or follow) this guide for Phaser 3 : Making your first Phaser 3 game: Part 1 - Introduction - Learn - Phaser

the game.js and phaser.min.js are just in the same place as index.html, i did add code in index.html to refer to the 2 js files.

please check console and network to check for any error and if files are requested or not.
there might be some problem in how you are loading you js files. So please share your index.html code if you can.

I got this error in the console in google chrome.
|Uncaught ReferenceError: windows is not defined at game.js:1|
Here is my code:
windows.onload = function() {
var game = new Phaser.Game()
I also use atom as my text editor.

Windows is no good :slight_smile:

Check your typo.

1 Like

thank you so much, i fixed it and it worked, lmao i am such a moron.