jk90 Posted March 17, 2014 Share Posted March 17, 2014 So i'm new to Phaser and HTML5 game making but I have managed to create my first game. The resolution of the game is 320x480 and displays ok on my chrome desktop browser, aswell as the chrome and android browsers on my galaxy s4, although it would be nice if it centered on the screen. The main problem is when I try to load the page in safari on my friends iphone 4 the browser just zooms in on the top left corner. What is the best way to get the game to scale nicely to full screen on browsers with smaller or close to resolutions and also center nicely for bigger resolutions. I would like to support as many devices as possible. It would also be nice to display a message warning a person to turn to portrait. Link to comment Share on other sites More sharing options...
rich Posted March 17, 2014 Share Posted March 17, 2014 Have you tried using any of the code in the resources/Project Templates/Full Screen Mobile folder? Link to comment Share on other sites More sharing options...
kass Posted March 18, 2014 Share Posted March 18, 2014 you can also use css to scale the game canvas. i added a button in one of my games that allows the user to pick a canvas size , and i had the default canvas size set using media queries. here is a quick example i threw together, i used html buttons, and jquery but you can do the same thing using phaser, for a settings menu etc. look at example Link to comment Share on other sites More sharing options...
Recommended Posts