On our website, we upload games made by our students. Because scaling up usually looks better we have a view port of 640x480 for all the student games and scale the canvas up to fit its container, so that the game looks good on most desktop environments.
However, since we started implementing 640x480 view ports, the area where a mouse press is registered remains in the 640x480 box, so if the canvas is scaled up, the "clickable area" is only party of the actual view port.
This breaks the controls of many games relying on mouse clicks. Is there any way to automatically scale up the "clickable area" with the canvas?
However, since we started implementing 640x480 view ports, the area where a mouse press is registered remains in the 640x480 box, so if the canvas is scaled up, the "clickable area" is only party of the actual view port.
This breaks the controls of many games relying on mouse clicks. Is there any way to automatically scale up the "clickable area" with the canvas?