nomatix Posted April 27, 2016 Share Posted April 27, 2016 Hey guys, i've recently gotten my game to display near full screen using Phaser Show_All in Cocoon.io and it works well enough. The only issue is that Show_All in Phaser uses a kind of letterbox scaling that isn't supported by Cocoon and I need to center my game. Apparently you can use Scale inner/outer to do this. Anyone know how to set this up in the config or html file for Phaser? Or just in general. I may be able to adapt some code from a different framework to work for Phaser. Thanks. Link to comment Share on other sites More sharing options...
nomatix Posted April 28, 2016 Author Share Posted April 28, 2016 nvm got it working, thanks anyways Link to comment Share on other sites More sharing options...
drhayes Posted April 28, 2016 Share Posted April 28, 2016 I'm glad you got it working. Can you post the solution for the next person who searches for this? Link to comment Share on other sites More sharing options...
nomatix Posted April 28, 2016 Author Share Posted April 28, 2016 I used this template https://github.com/CocoonIO/cocoon-template-phaser/tree/master/www which works with cocoon, and then I set used Phaser.RESIZE for multi device scaling following this template http://codetuto.com/2015/08/multiscreen-development-in-phaser-2-4-2/. What wrapped it all together was adding in this code to my html file provided by Vita Use code: canvas_width = window.screen.availWidth * window.devicePixelRatio; canvas_height = window.screen.availHeight * window.devicePixelRatio; game = new Phaser.Game(canvas_width, canvas_height, options.render, 'gamewindow'); Link to comment Share on other sites More sharing options...
Recommended Posts