Jump to content

Building your Phaser Projects with Browserify


OttoRobba
 Share

Recommended Posts

Hey folks :)

 

View tutorial on how to use Browserify with Phaser

 

Phaser + Browserify template

 

Phaser + Browserify + CoffeeScript template

 

Let me know what you guys think :)

 

Installing the templates is easy. Using the command line, cd into the folder you extracted and run

npm install

Then you can simply run it all with

sh start.sh

There is also a nifty Loading screen and nice default states :)

 

eDImkI5.png

Link to comment
Share on other sites

I was looking for something like this on Phaser, I've only had a quick look at this. Thank you very much, I will have a closer look at the tutorial by time.
If you have finished your game, you only have to keep and include the bundle.js am I right?

I would love to see if this runs in CocoonJS. But this should be no problem I guess, again: thank you :)

Link to comment
Share on other sites

I was looking for something like this on Phaser, I've only had a quick look at this. Thank you very much, I will have a closer look at the tutorial by time.

If you have finished your game, you only have to keep and include the bundle.js am I right?

I would love to see if this runs in CocoonJS. But this should be no problem I guess, again: thank you :)

 

Due to a bug between Phaser and Browserify, you need to concatenate phaser.js with bundle.js if you want to distribute your game in a single .js file. Sorry  :( 

After you concatenate it should run just fine with CocoonJS though :)

I wanted a solution for development even if I had to use Gulp or something else when distributing, given the limitations we currently face.

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...
  • 4 months later...
  • 8 months later...

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...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...