• 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 Fullscreen doesn't get mouse input properly

D

DanjelRicci

Guest
I know Nocturne said HTML target will get some significant updates soon and this may be a bug already solved for the next version, but I'd like to try and ask regardless since I feel I'm missing something.

Trying with few words first: basically when I set the game fullscreen, mouse input only works in an area as big as the original game size, positioned top-left on the screen.

Now more specifically: suppose my game size is 960*540, placed middle center of a simple web page. After I set the game fullscreen with window_set_fullscreen(true), it fills the screen at 1920*1080... But now mouse input only works in the first quarter of the screen, basically the first 960*540 pixels aligned top left. If I click anywhere after the 960th px horizontal or 540th px vertical from top left, the input is not registered at all. It's like the game only extends the "render area" and not the "clickable area" to full screen. Also in the area where mouse input works, there is no wrong input scaling (mouse x and y are at the correct place).
Hope I managed to explain well... As usual tested on Safari and Chrome, last GM2 version.
 

chmod777

Member
Is it a custom code (used in an extension or somewhere else) or the GameMaker "built-in" fullscreen (pressing the F10 key, as window_set_fullscreen() does nothing)?
If it's F10, then that might be a bug as I have never encountered any issue with that in GMS 1.4.
 
D

DanjelRicci

Guest
Is it a custom code (used in an extension or somewhere else) or the GameMaker "built-in" fullscreen (pressing the F10 key, as window_set_fullscreen() does nothing)?
If it's F10, then that might be a bug as I have never encountered any issue with that in GMS 1.4.
I later realized that F10 was a "built-in" command, but since I was firing window_set_fullscreen() with the F10 key, I though it worked. Dumb! :D
Anyways after removing those lines of code and just keeping the default F10 function, the bug is still here. I am using the default HTML page exported by GM2.
 
M

MarceloP

Guest
Hey @DanjelRicci,

As matter of testing, what happen in your case/bug when you set the HTML canvas to the center of the HTML generated by GM? Does all clicks start working only in the center?
If you open Developer Tools (CTRL + SHIFT + I on chrome) then go to fullscreen, do all this area get shifted to the left as well?

See, this won't help you, but can be very valuable for Yoyo when reporting this bug.
 
D

DanjelRicci

Guest
As matter of testing, what happen in your case/bug when you set the HTML canvas to the center of the HTML generated by GM? Does all clicks start working only in the center?
In this case nothing changes, fullscreen input is still limited in the first quarter of the screen.

If you open Developer Tools (CTRL + SHIFT + I on chrome) then go to fullscreen, do all this area get shifted to the left as well?
In this case input is once again limited in the first quarter of the screen, but this time the game renders at the same non-fullscreen size, snaps upper-center, and the rest of the screen is black.
 
Top