fariazz

Tutorial - How to make a game in Phaser 3

Recommended Posts

I discovered running this tutorial and others that brackets does not load assets correctly. It`s possibly my default settings. Yet, when I use XAMPP ,this tutorial works as designed. 

Thanks for your insight on Phaser3

Share this post


Link to post
Share on other sites
On 3/31/2018 at 12:42 PM, PBMCube said:

I discovered running this tutorial and others that brackets does not load assets correctly. It`s possibly my default settings. Yet, when I use XAMPP ,this tutorial works as designed. 

Thanks for your insight on Phaser3

That's strange to hear, Brackets works well on my end for Phaser. I prefer turning the auto-reload feature off and refresh manually.

Another option for a web server is to install Node.js and the http-server package:

1) download and install Node.js

2) on command line, install the http-server package globally:   npm install http-server -g

3) navigate to the folder where your Phaser project is located, type:   http-server   , that will launch a local web server for that folder

Share this post


Link to post
Share on other sites

No, that's wasn't it. I discovered that 

On 4/9/2018 at 6:03 PM, fariazz said:

That's strange to hear, Brackets works well on my end for Phaser. I prefer turning the auto-reload feature off and refresh manually.

Another option for a web server is to install Node.js and the http-server package:

1) download and install Node.js

2) on command line, install the http-server package globally:   npm install http-server -g

3) navigate to the folder where your Phaser project is located, type:   http-server   , that will launch a local web server for that folder

No that wasn't it. I found that ...

Phaser v3.x.x (20180322); REMOVE ANTI-PATTERN
 CORS: Remove anti-pattern!
 - https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
 - https://enable-cors.org/
 Avoid this anti-pattern of omitting the protocols schemes in script "src";
 Cross origin requests are only supported for protocol schemes:
 http, data, chrome, chrome-extension, https.
 - ***the anti-pattern is this:***
 <script src="//cdn.jsdelivr.net/npm/phaser@3.3.0/dist/phaser.min.js"></script>
 - use this: <script src="https://cdn.jsdelivr.net/npm/phaser@3.3.0/dist/phaser.min.js"></script>

 

When I inserted the protocol everything worked perfectly.  Great tutorial now that everything is working.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.