High (2048px+) resolution canvas game gets capped to 30fps


  • I'm making a game for win8 using a canvas. It's a pretty basic looking game so I'm making it so that always runs on the screen's native resolution.

    For the game loop I'm using setInterval(loop, 1), which means that it loops as often as possible. When I make an fps counter (or loop counter technically) I get around 250fps.

    This value stays the same no matter the resolution of the canvas up to 1920x1080. But, when the canvas gets more than 2048px wide the fps suddenly drops and stays at 30fps no matter what. This really affects the feeling of my game.

    This must be a built-in limitation to prevent high cpu-loads or something, I wonder if you can turn it off because the cpu load is only like 15% anyway. I also tried using requestAnimationFrame(loop) instead but the problem stays. Does anyone know anything about this?

    Friday, December 21, 2012 8:51 PM