EmeraldZone Posted August 27, 2014 Share Posted August 27, 2014 Hey. I am fairly new to phaser and javascript game dev in general. I have been hacking away with phaser for a few weeks. Haven't made anything major. I am currently working on a prototype and my play state is just blowing out of proportion. I was wondering if there is a module system like Requirejs or Browserify that works well with phaser. Just so I can separate out entities from the state. Link to comment Share on other sites More sharing options...
crysfel Posted August 27, 2014 Share Posted August 27, 2014 Im using "phaser-official", it allows you to separate your states, also you can generate prefabs for your characters or whatever you need. https://github.com/codevinsky/generator-phaser-official It includes Browserify, grunt, a webserver and many more goodies. Good luck! EmeraldZone 1 Link to comment Share on other sites More sharing options...
gnumaru Posted August 28, 2014 Share Posted August 28, 2014 If you do not want/neet to concatenate the entire code base into a single js file, you can use my solution, executejs: https://github.com/Gnumaru/executejs It is not an asynchronous module loader like requirejs or a build tool like browserify, it is a simple facility to execute one js file from within other js file, like you would do with require and require_once in php or the several include/import/using statements from other languages like C, java and C# Link to comment Share on other sites More sharing options...
EmeraldZone Posted August 29, 2014 Author Share Posted August 29, 2014 Thanks for the options guys. I am going to give the two of them a bash and see which one works better for me.And hopefully I will be posting a game, sometime in the near future Link to comment Share on other sites More sharing options...
Nepoxx Posted August 29, 2014 Share Posted August 29, 2014 I recommend reading this topic before taking a decision: http://www.html5gamedevs.com/topic/8857-alternatives-to-organize-code-base-into-several-files-amd-browserify-and-alikes/ Link to comment Share on other sites More sharing options...
Recommended Posts