dlobalzo Posted May 16, 2015 Share Posted May 16, 2015 Hello!I'm pretty new to Phaser and so far I think it's great. However, I'm having lots of problems with making a properly responsive game. What I'm trying to achieve is a game that correctly adapts to desktop, tablet and mobile. So far I'm detecting the device pixel ratio and trying to consider that when positioning elements and scaling, but it's really frustrating and hard to accomplish, so I was wondering is there is a correct way of doing this. Thanks in advance! Link to comment Share on other sites More sharing options...
Gods Posted May 16, 2015 Share Posted May 16, 2015 Well Phaser 2.X actually includes a template for this https://github.com/photonstorm/phaser/tree/master/resources/Project%20TemplatesI am sure Phaser 3 will too when its ready for release. Cawrtz and paul_nicholls 2 Link to comment Share on other sites More sharing options...
dlobalzo Posted May 20, 2015 Author Share Posted May 20, 2015 Thank you for your answer! But is it ok to assume Phaser will do the translation of coordinates when using a 320px width phone and a 810px width desktop canvas for example? Thank you! Link to comment Share on other sites More sharing options...
Skeptron Posted June 24, 2015 Share Posted June 24, 2015 Coordinates do not rely on the screen size, so a character at 100/100 coords will be at the same place wether you have a 300x400 or a 2000x4000px canvas. The size of the canvas is just the size of the camera view. Link to comment Share on other sites More sharing options...
Recommended Posts