I want my game to be played in different devices in browser.
So, What do you advise?
Edited by KozKoz, 13 April 2012 - 03:16 AM.
Posted 13 April 2012 - 02:18 AM
Edited by KozKoz, 13 April 2012 - 03:16 AM.
Posted 13 April 2012 - 05:21 AM
Posted 13 April 2012 - 11:28 AM
STEP EVENT: window_center(); x0 = max(0, (room_width - browser_width) / 2); y0 = max(0, (room_height - browser_height) / 2);
Posted 09 July 2012 - 12:42 AM
A technique that I've been using is to make the room size some arbitrarily large value like 1960x1080 then using window_center() to place the canvas in the centre of the browser, making it essentially fullscreen. Then you can use room_width, room_height, browser_width and browser_height to find the coordinates of the top left corner of the screen and place objects relative to that, for example:
STEP EVENT: window_center(); x0 = max(0, (room_width - browser_width) / 2); y0 = max(0, (room_height - browser_height) / 2);
0 members, 0 guests, 0 anonymous users