nkholski Posted August 17, 2017 Share Posted August 17, 2017 I updated the excellent Phaser + ES6 + Webpack bootstrap project (https://github.com/lean/phaser-es6-webpack) with Phaser 3. Most of my repository is an exact copy of that repository, only with the Phaser package updated to Phaser 3 and the example replaced with one based on Phaser 3. The example source code is not an example of best practices, it's basically guess work but it works and take advantage of ES6 classes. This will do for testing out Phaser 3 but I think it would be a really great idea if Phaser 3 got an official bootstrap project when released (with ES5/ES6+/Typescript options), and that could be community driven. Github: https://github.com/nkholski/phaser3-es6-webpack Fenopiù, samme and Raicuparta 3 Link to comment Share on other sites More sharing options...
slick Posted August 17, 2017 Share Posted August 17, 2017 I think it would be a really great idea if Phaser 3 got an official bootstrap project on StackBlitz when released. Link to comment Share on other sites More sharing options...
stupot Posted September 5, 2017 Share Posted September 5, 2017 you'll need to fix up the webpack.production.config.js to be able to run 'npm run deploy' Link to comment Share on other sites More sharing options...
nkholski Posted September 5, 2017 Author Share Posted September 5, 2017 There is an open issue on GitHub for that. I'll update the repository when the first Phaser 3 beta is out, and will close this issue then too. However, I'm a bit curious why someone would need deploy at this stage :-). Link to comment Share on other sites More sharing options...
stupot Posted September 7, 2017 Share Posted September 7, 2017 On 05/09/2017 at 7:47 PM, nkholski said: There is an open issue on GitHub for that. I'll update the repository when the first Phaser 3 beta is out, and will close this issue then too. However, I'm a bit curious why someone would need deploy at this stage :-). I was just running through the readme.md and it says you can do that, though I do realise this was cloned from the PhaserV2 version which says exactly the same. I did fix it up myself because I wanted to compare the output and play with the uglify compress options but my fix (bodge) was for my purposes only rather than a generic one so didn't try to submit it. Link to comment Share on other sites More sharing options...
srobertson421 Posted September 9, 2017 Share Posted September 9, 2017 I tossed up a spritesheet and input example in my fork if anyone is interested! Thanks nkholski for the repo!https://github.com/srobertson421/phaser3-es6-webpack/tree/dev Link to comment Share on other sites More sharing options...
nkholski Posted September 9, 2017 Author Share Posted September 9, 2017 Wow. I'll take a look tonight. Actually it's not a bad idea to treat the example as a playground that can be packed with additional features one may think of. I think it could be helpful for getting a insight to Phaser 3. I'll merge the PR when I have tested it! Thanks Link to comment Share on other sites More sharing options...
nkholski Posted September 11, 2017 Author Share Posted September 11, 2017 I merged the PR and made a boot menu to choose from different examples. I also scaled the player up in your example and added a bit higher velocity. Deploy should work now. stupot 1 Link to comment Share on other sites More sharing options...
srobertson421 Posted September 12, 2017 Share Posted September 12, 2017 Awesome! Good idea with the boot menu, I'll keep playing around and if I make any more examples I'll shoot over a PR. Cheers! Link to comment Share on other sites More sharing options...
Raicuparta Posted September 16, 2017 Share Posted September 16, 2017 Hey, I made a quick game using your bootstrap:https://github.com/Raicuparta/square-touch Or if you want to try the game (better on mobile) http://square-touch.surge.sh I had to comment out the UglifyJS stuff from the webpack production config file, otherwise deploy would fail when it found something like this: const b = 20 const c = 30 const values = { a: 10, b, c, } Fails on the comma after b inside values, with the error: Unexpected token: punc (,) But this bootstrap really made things a lot faster, thanks! nkholski 1 Link to comment Share on other sites More sharing options...
nkholski Posted September 22, 2017 Author Share Posted September 22, 2017 That's great. I hope to update the repository next week with the upcoming Beta 3, and I'll link to your game in the readme then. Will try to look into what breaks deploy too. Link to comment Share on other sites More sharing options...
Recommended Posts