• 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 Scaling issues with runtime 2.1.4.203 [SOLVED]

Ricardo

Member
Hey!

I've been using for long time @Nocturne script to do scaling in HTML5. That old, good and always working HTML5 scaling snipped is now giving me offset coordinates. It seems like the GUI size is not following the canvas scaling, affecting clicks events in objects.

I can see Mark reported the issue here, and although it was flagged as resolved, it seems like the problem is still there (I even downloaded the attached example and managed to reproduce the problem, the square is not clickable when the windows is resized).
I also created my own example that shows the offset problem in action when the windows is resized down.

Does anyone knows if this is a valid bug/issue, or if something that changed in the runner now requires a different approach in the scaling code I might be ignoring? I tried several approaches and unfortunately I can't find a working scaling solution for HTML5 anymore.
 

clee2005

Member
For me it's the window_set_position() that is no longer working as it did in 2.1.3.189. The newer runtimes (.200+) all seem to have changed how that function affects HTML5. That function is central to the scaling script you are referring to I believe.
 

Ricardo

Member
I'm actually not using window_set_position(), I think I'm just using window_center(). However, there's a bug with the scaling. The only alternative I found was rollback the runtime, which is a shame because versions 200+ has several interesting HTML5 fixes.
 

clee2005

Member
I found that window_set_position() will now work only if there is an index.html file in the Included Files and the project is set to use it (HTML5 options setting). This is the opposite of what the documentation currently says.

You're right though the mouse coordinates are all off as well.
 
Top