• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

HTML5 HTML5 Scaling and mouse position issue

C

Chris Goodwin

Guest
Goal achieve full scale in HTML5:

When I go to resize/stretch my game inside HTML5 the GUI looks how it is suppose to, but the normal draw events are not resizing/stretching and the x and y coordinates are off. How can we get GMS2 > HTML5 game to go full scale and have events like Mouse "Left Pressed" function properly?

I see this ticket: https://bugs.yoyogames.com/view.php?id=28504 (if you download the example bug file it is still present in the newest run time 2.1.4.212 )but this is from 6 months ago. I have a finished game I am trying to get on Facebook Instant, but can't at the moment due to mouse position and scaling issues in GMS2... How can I get around this? Rollback to a different run time?
Thanks.

Using
IDE: v2.1.4.288
Runtime: 2.1.4.212

Here is the basic code:

Code:
var my_w = browser_width;
var my_h = browser_height;

view_wport[0] = my_w;
view_hport[0] = my_h;

camera_set_view_size(view_camera[0], my_w, my_h);
camera_set_view_pos(view_camera[0],0,0);

window_set_size(my_w, my_h);
window_center();

surface_resize(application_surface, my_w, my_h);
 
Last edited by a moderator:
C

Chris Goodwin

Guest
The overall x and y coordinates seem to be off. If I spawn an object they don't always appear where they should.
 
C

Chris Goodwin

Guest
Thank you for your response.
In GMS2 is it possible to get a dev/early access build?
In the bugs notes you posted I saw "I tried this in the latest dev build (9.2.1.1386 with runtime 9.9.1.993) and it looks like it's already been fixed."
 
F

FormalCloud

Guest
Those are internal dev builds, there is no early access for GMS2 that the public has access to.
 
Top