Before creating game object - var screenWidth = Math.max(window.innerWidth, document.documentElement.clientWidth); var screenHeight = Math.max(window.innerHeight, document.documentElement.clientHeight); - Then set the size to screenWidth/screenHeight at creating the game object Then to get the game width/height use: - game.world.width game.world.height - or - screenWidth screenHeight -