notalentgeek

[Newbiew Question] To what extends I can keep using phaser.min.js?

3 posts in this topic

I have downloaded Phaser from github and I saw all the examples and tutorials there are using phaser.min.js or phaser-example.js. However I saw in the src folder there are a ton of js files.

 

My question are to what extend I can keep using phaser.min.js?

And when it is necessary to import those js files from src folder?

 

I am sorry if this obvious question. I am new to js and just moved from flixel. :) I would be grateful if someone would like to explain me. :D

Share this post


Link to post
Share on other sites

You should include phaser.min.js in your html when you deploy the final, finished version of your game.

 

Until that point you should use phaser.js (the non-minified version) as you'll get accurate debugging / line numbers from it should something die internally.

 

You only really need to use the src files if you are:

 

1) Hacking around the library (which I totally encourage btw!)

2) Trying to fix a Phaser bug or track-down a Phaser specific error

3) Wanting to understand how the code works better.

 

The reason the examples use the raw source files is because we use them as a form of unit test, and are constantly testing new features in the library, and it'd be a pain to have to rebuild the phaser.js file every single time just to do this. So usually we only do that when we release a new version.

Mike and notalentgeek like this

Share this post


Link to post
Share on other sites

Rich, this answer is a for FAQ page or somewhere there. Although a knew it from long ago, it's synthesized very good! :)

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.