gbachik Posted April 8, 2014 Share Posted April 8, 2014 I currently want to build a game for iPhone (I have a 5s) using Phaser and CocoonJS. I'm just wondering what the best/most optimized initial game size would be for this! aka for this code:var game = new Phaser.Game(800, 600, Phaser.AUTO, 'icicle-man');What would be the best options to replace 800 & 600 with? -Thanks Link to comment Share on other sites More sharing options...
Videlais Posted April 8, 2014 Share Posted April 8, 2014 Hi, gbachik. Generally, you can use the following:var game = new Phaser.Game(window.innerWidth, window.innerHeight, Phaser.CANVAS, '', {preload: preload, create: create, update: update});CocoonJS reports the size of the screen through its window.innerWidth/Height. I also highly recommend reading through this list of common issues between Phaser and CocoonJS. It covers all of the reported problems we are currently aware of. plicatibu 1 Link to comment Share on other sites More sharing options...
adamyall Posted April 8, 2014 Share Posted April 8, 2014 Note that your code will have to be more clever and use less hard-coded values if you go the route mentioned by Videlais. By all means it's the best, most flexible approach, but you will have to make your code more flexible, instead of just using iPhone screen sizes. Link to comment Share on other sites More sharing options...
gbachik Posted April 8, 2014 Author Share Posted April 8, 2014 Okay thanks for the replies!I'll do that!@adamyall didn't understand what you meant at firrst but I'm assuming you mean for pixel scaling level sizes etcI'll keep that in mind thanks! Link to comment Share on other sites More sharing options...
Recommended Posts