gbachik 1 Posted April 8, 2014 Report 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 Quote Link to post Share on other sites
Videlais 49 Posted April 8, 2014 Report 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 Quote Link to post Share on other sites
adamyall 21 Posted April 8, 2014 Report 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. Quote Link to post Share on other sites
gbachik 1 Posted April 8, 2014 Author Report 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! Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.