Daniel Belohlavek

Members
  • Content Count

    96
  • Joined

  • Last visited

About Daniel Belohlavek

  • Rank
    Advanced Member
  • Birthday 05/28/1996

Contact Methods

  • Twitter
    @dbhvk

Profile Information

  • Gender
    Male
  • Location
    Buenos Aires

Recent Profile Visitors

1,108 profile views
  1. Daniel Belohlavek

    Phaser ES6/ES2015 Boilerplate

    Hello everybody! There are a couple of discussions going on at Github regarding the name of the project, the use of Webpack and tutorials. I would love your input so please check out the Issues section and don't forget to Watch the repo if you want to stay updated on future discussions! Happy coding!
  2. Daniel Belohlavek

    Phaser ES6/ES2015 Boilerplate

    First of all: thanks everybody for the kind comments. I haven't been using the boilerplate lately so if you find any bugs please submit them as issues on Github (remember to reproduce the bug on different environments). Here's how I used to do it (there's a new version of VScode, check the docs as there may be a better way): Drop all necessary definition files (.d.ts) on the root of your project. Create a jsconfig.json file on the root of your project that contains the following:{ "compilerOptions": { "target": "ES6" }, "files": [ "./src/index.js", "./src/states/GameState.js", "./src/objects/RainbowText.js", "phaser.d.ts", "pixi.d.ts" ]}Note that all the "Files" belong to the default files found on my boilerplate, please update those to match your needs. Checkout the docs for more information: https://code.visualstudio.com/Docs/languages/javascript And feel free to ask for help if this doesn't work
  3. Daniel Belohlavek

    Phaser ES6/ES2015 Boilerplate

    Hey, thanks for checking out my project! Let me address your comments: Watchify is a watch mode for browserify, My gulpfile actually watches several types of files that are not necessarily related to JS. I'll read more about it before deciding if it's worth including another dependency. I'm aware that writing 'export default class' es enough, I just like the other syntax better (I guess I am being heavily opinionated on this one ) I try to keep things as generic as possible (though I fail to do so sometimes). Gulp-notify and node-notifier would qualify as personal-choice dependencies! Live reloading works great for small games and quick prototyping in my experience. If many people find it annoying I will add a simpler way to disable it. For those who really want to disable Live reloading, just remove all instances of browserSync.reload I'll happily read and consider suggestions filed via Github's issue tracker! Again, thanks for taking your time to check my project and I hope you find it easy enough to adapt to your personal needs
  4. Daniel Belohlavek

    Phaser ES6/ES2015 Boilerplate

    @nkholski, as @yahiko said Typescript and ES6 are similar, you can check out some TS examples and "port" them to ES6 if you want a fast solution. The other alternative would be to wait a little while for me to write my own well-featured example Sorry for not providing a more complex game in the repo: since it's a boilerplate people would end up deleting lots of files as they are not relevant to their projects. To complement @yahiko's reply, here's a link where you can learn more about ES2015 syntax: https://babeljs.io/docs/learn-es2015/
  5. Daniel Belohlavek

    Phaser ES6/ES2015 Boilerplate

    Brief update, version 1.0.2 now features: Faster builds (no need to copy static files every time).Live reload now works with static files too!That should make it a little bit easier to play with the DOM (if you need to). Any suggestions or feature requests? I'll probably upload an example on how to make the most out of the boilerplate soon. Repo link if you don't feel like scrolling your way up.
  6. Daniel Belohlavek

    Phaser ES6/ES2015 Boilerplate

    @Skeptron you are welcome! @nkholski it's fast enough, but the build task is copying static files on each build (I think it sould only do it on the first build). Probably will fix this sometime this week to make it faster. @drhayes Both Webpack and Browserify are module bundlers. Gulp (and Grunt, for example) are build systems designed to create and take control of different build tasks that are not always related to modules. Bundling be should one of several tasks found in a complex project. @Nortonio Nice! You forgot to remove the RainbowText class from the source! In case someone is interested: here are a couple of GIFs demonstrating how fast build tasks are executed. Please remember that this should be a little bit faster in the near future (maybe you should watch the Github repo!) Windows 7 build (i7 3.4GHz 8 CPUs, 8GB RAM): see recorded GIF. Ubuntu 15.04 build (Virtual Machine, 4 CPUs, 2GB RAM): see recorded GIF. In both recordings I run a development build + 2 updates that will reload the browser. The second one may be hard to see, recording GIFs is complicated, better test it yourself
  7. Daniel Belohlavek

    Phaser ES6/ES2015 Boilerplate

    Personally I use Webpack only with React and JSX for front-end development. The reasons why I went with Gulp + Browserify are the following: Webpack takes care of everything under it's magical hood, not ideal for newcomers who are trying to wrap their heads around the build process.I wasn't able to correctly configure hot module replacement, so if I was going to do Livereload, Browsersync seemed to be a little bit more robust (and comes with Weinre, lots of devs here do mobile games).I needed to copy, move, and delete files/folders. While this is possible in Webpack using plugins, remember that Webpack is not intended to be a build system.Anyways, I'm glad to see that some of you are hacking your way through Phaser development in ES6 too ^^ Disclaimer for other readers: Webpack is by no means a weak tool. Choose whatever you are comfortable with, and if you feel like you have no idea what you are doing check out my Boilerplate where I try my best to explain each step and make it easy to change stuff.
  8. Daniel Belohlavek

    Phaser ES6/ES2015 Boilerplate

    Brief update: the project was updated to work correctly on Windows. Also a deprecated Gulp plugin was replaced. Thanks to all those who collaborated and have fun making games in ES6
  9. Daniel Belohlavek

    Phaser ES6/ES2015 Boilerplate

    @drhayes I haven't ran any perf tests myself, but please check: http://kpdecker.github.io/six-speed/ Also, keep in mind that with Babel every single transformation can be turned off (in case your environment supports ES6). @stupot your solution didn't work for me, please check the comments in the PR (if you don't mind lending me a hand ).
  10. Daniel Belohlavek

    Phaser ES6/ES2015 Boilerplate

    Hello! It's been a while since my last topic, I've been feeding my brain a little bit and here is the result: I've created a tiny boilerplate available on Github. The aim of the project is to help other developers to get started a little bit faster without having to spend too much time setting up Build tasks (basically setting up the transpiler). The project comes with: A heavily commented gulpfile that uses Browserify and Babel to transpile your ES6 code into ES5.Two build modes: development and production (neither one is too complex or opinionated).Browsersync for live reload and weinre for your mobile debugging needs.UglifyJS for the production build. No sitelock or heavy obfuscation code included.You can access the repo here: https://github.com/belohlavek/phaser-es6-boilerplate You can see the example included on codepen (no modules): http://codepen.io/belohlavek/full/aORJVL Bonus information: You can get code intellisense for ES6 with VSCode + phaser.d.ts (Typescript definition). Works like a charm on Ubuntu. If you feel I missed out on something, or worst, if you think I screwed up please let me know! I'm sure there are at least a couple of dumb typos out there. Are any of you already using Babel with Phaser? Any Typescript users willing to give ES2015 a try? Thanks for reading
  11. Daniel Belohlavek

    Html5 Game Development Contest in China

    I didn't answer because I didn't want to sound rude (anyone can participate at their own risk) but I agree with True Valhalla.
  12. Daniel Belohlavek

    Html5 Game Development Contest in China

    @Spyro23 maybe but such images would deceive the visitors thus making the contest unfair. Even if those games are not part of it, I think it is unethical.
  13. Daniel Belohlavek

    Html5 Game Development Contest in China

    A couple of questions: Will our games stay on your site after the contest?Will we earn any revenue during the time that our games are on your site?Will we earn any revenue AFTER the contest is finished? (If you keep our games on your site)Can we remove our games at any time? I saw some games on your site that use images or characters that don't belong to them. What's your opinion about that? Examples:Candy crush logo: http://www.51h5.com/game-index-id-647.htmlOne Piece characters: http://www.51h5.com/game-index-id-500.htmlPokemon characters: http://www.51h5.com/game-index-id-722.htmlDespicable Me's minion: http://www.51h5.com/game/595.htmlAngry Bird's pig: http://www.51h5.com/game/653.html
  14. Daniel Belohlavek

    "Zooming into" a specific point.

    Did you try moving the displayObjectContainer to the mouse position on each "screen zoom event"? I was going to implement the same feature for my game (in Phaser) to zoom a Group to the middle point of a Pinch. But I haven't tried yet because I was busy with other mechanics :-/
  15. Daniel Belohlavek

    Egret English version coming soon!

    @PixxelPicoSean I think they just want to use Flash for design purposes, like drawing characters and exporting them with bone animation. Other than that the only aspect related to Flash seems to be the AS3 to Typescript tool. It's not just "a Flash API on top of HTML5 technologies" because they certainly offer a good bunch of tools and editors to aid development.