Sign in to follow this  

What's The Best Phaser.Game Size For IOS?

Recommended Posts

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?



Share this post

Link to post
Share on other sites

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.

Share this post

Link to post
Share on other sites

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.

Share this post

Link to post
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.