notalentgeek

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

Recommended Posts

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.