eitank Posted April 25, 2014 Share Posted April 25, 2014 I want my app will fit seamlessly mobile devices and computers. So that the user will feel naturally while using my software similar to a native mobile application. I don't need only a phone fix but also, on re-size the browser window I want to be able to respond and to change the screen. I'd like to know what is the best way to make a "responsive screen" using phaser? Link to comment Share on other sites More sharing options...
jouniii Posted April 27, 2014 Share Posted April 27, 2014 I would separate the sprite placement to configuration set which can be changed on the fly based on some trigger points. Much the same way as responsive css is done with media queries. Link to comment Share on other sites More sharing options...
jouniii Posted May 14, 2014 Share Posted May 14, 2014 I went in direction of custom Phaser plugin LayoutManager which allows you to attach objects (with position Point property) for monitoring with attached "orientation" functions which automatically change positions of the attached objects when size is resized. This allows alignment to different borders and positioning based on relative units (percent) and with custom "orientation" functions to reposition objects based on width/height trigger points. That solution also pointed small thing with tweeing positions that it is always absolute unless you use separate object to tween and use this as delta for position x/y. It was fairly easy to integrate that with the solution I made, but maybe that delta/offset position could be feature of Phaser sprite/groups? Link to comment Share on other sites More sharing options...
Recommended Posts