2

I am creating a Facebook Instant game using GameMaker Studio 2. It works fine on desktop browsers, but on the mobile Messenger app, the resolution gets fixed to 360*640 (or something around that).

While the game goes fullscreen in the app, it seems like the canvas stays at 360*640.

I got the screen size using the code below and applied it to the game:

var w = window.innerWidth * window.devicePixelRatio;
var h = window.innerHeight * window.devicePixelRatio;

Now, the game appears at the correct resolution (720*1280), but doesn't fit into the canvas. Only the top-left (360*640) part of the game is visible.

How can I stretch the size of the Facebook game canvas on mobile? Or is there something I am doing wrong?

0 Answers0