How to choose a resolution for my game?

I quote from the documentation for ScaleManager:

If you wish for the canvas to be resized directly, so that the canvas itself fills the available space (i.e. it isn’t scaled, it’s resized) then use the RESIZE scale mode. This will give you a 1:1 mapping of canvas pixels to game size. In this mode CSS isn’t used to scale the canvas, it’s literally adjusted to fill all available space within the parent. You should be extremely careful about the size of the canvas you’re creating when doing this, as the larger the area, the more work the GPU has to do and it’s very easy to hit fill-rate limits quickly.

When I was starting, I simply assumed that it’s okay to make my game fill the screen (or the browser window). Now that quote game me pause. While I understand the theory behind it, I’ve never seen a warning like this in, say, a C++ game engine. Is this because of Javascript and WebGL?

Anyway, is there an accepted rule of thumb for choosing a resolution for my game?

I don’t know any rules but 2k or 4k is probably too big. :slight_smile:

How about some best practice tips? How did you go about it in your games and projects?

You could just pick a popular resolution for tablets or medium-size desktop display.

So you recommending a fixed resolution for all devices? No dynamic resolution depending on the users display / window size?

I usually use scale mode FIT. I think the caution in the docs is more about RESIZE. You can use either FIT or RESIZE, it’s a design judgment.