rblopes / generator-phaser-plus

[🛑 DISCONTINUED] It has been a long journey but development of `generator-phaser-plus` is now over. I recommend you have a look and fork `yandeu/phaser-project-template` instead.
https://github.com/yandeu/phaser-project-template
MIT License
144 stars 14 forks source link

[Suggestions] responsive screen resolution #30

Open SaniHaque opened 5 years ago

SaniHaque commented 5 years ago

since phaser 3 doesn't t have proper scale manager yet(or never). If you add support for the different screen sizes that would be wonderful. also, orientation(check) support, Thank you.

rblopes commented 5 years ago

Hi. Sorry for the late reply.

Please consider trying phaser-plugin-game-scale, by samme. He's a very active member of the Phaser community, you can bet he put a good amount of work and care creating that plugin.

Also, it is expected that Phaser 3.12 will come with the first implementation of the Scale Manager. It's a big task, may take longer than anticipated, but you can be sure they are working on it right now.

Of course I could build orientation and screen responsiveness into the sample project, however I think this is best approached by third-party plugins and a proper Phaser API in the future rather than implementing some “hacky” and hard to maintain solution myself ─ which I'll likely have to remove in favor of a better solution later.

That happened before. You wouldn't believe how much trouble even the tiniest thing can introduce if not done the right way. And it'll end up on everyone else's projects once added to the sample project. People won't bother coming back to fix it later if they think it just works.

That's why I prefer the “Hello World” aspect of the sample game, to keep it tiny and simple, in contrast to the several other templates and boilerplates published by other developers, some that even contain fully featured games on it, as that may hinder developer choices too. Say for example you find that one template is using a weaker finite state machine library than the one you're used to and want to replace it, you'll lose a lot of time adapting parts of that template, a time best spent in creating the game itself.

SaniHaque commented 5 years ago

You are right of course, to have phaser it's own Scale Manager. But Once it's implemented consider including in project setup. It'll be easier to implement for beginners. I think. Keep up the good work.