Hello game dev community. I have recently got into making games in a browser window, and me and a friend ran into a common problem. Let's say I have a game like diep.io, where users can control their tank and move across a large grid. Each player can only see a certain distance, even if they moved the window to a larger monitor, like from 1080p to a 4K monitor.
I've created a game in HTML5 canvas, but the problem is that it depends on the browser's
innerHeight properties. I can tell that this is an issue, because if I drew a grid, one player on a 1080p monitor could only see
x distance but a player on a 4K monitor with a larger width and height could see
x * 2 distance (or how much larger it actually is), meaning that the player on a 4K monitor has an advantage, by seeing players in a larger distance.
How exactly could I tackle this problem? My friend has the same issue, and I hope this answers it.