Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

How do you test your game across different resolutions?

A topic by ENJOYBASE created 22 days ago Views: 555 Replies: 13
Viewing posts 1 to 6

I’ve been working on a Unity project and found testing the same flow across different resolutions pretty tedious.

I’m experimenting with a tool that lets you record a test once, then replay the same actions at different resolutions to catch UI/layout issues.

For example: record at 1920x1080, then automatically replay at 1920x1200, 1280x800, 3440x1440, etc.

I’m curious how other developers handle this right now. Do you test resolutions manually, use automated tests, or mostly just check a few common sizes?

Would something like “record once, test across resolutions” actually be useful in your workflow?

I test manually. I obviously can’t test every possible resolution, so I focus my testing on the extremes: really small window, really wide window, really tall and skinny window, and 2160p full-screen.

Automated testing for UX issues is problematic. I could write automated tests for things like “make sure the enemies spawn off-screen”, “make sure the event my character is reacting to is on-screen”, “make sure all text fits the window without going smaller than a specified font size”, but doing so would be difficult. I can’t write automated tests for more subjective elements like “make sure the player can see far enough that she can reasonably respond to threats in time” and “make sure the text is readable at all resolutions”. So I generally don’t bother with automated testing for UX issues at all.

Thanks, that’s really helpful. The “test the extremes manually” workflow is exactly what I was curious about.

I agree that subjective UX is difficult to automate. What I’m experimenting with is a bit different — rather than trying to decide whether the UX is “good,” it records a test flow once, replays the same flow at several resolutions, and looks for visual/layout regressions or unexpected differences for a human to review.

Would something like that actually save you time, or would you still prefer checking the extreme resolutions manually?

I usually, load the level or section I want to test and change the resolution with a single key press while testing the level / section.

That makes sense. When you do that, is the annoying part mostly checking the same UI/screens manually at each resolution, or is switching resolutions itself already quick enough?

The resolution switch happens on the next frame. It's just a matter of looking at all elements and make sure they work OK at all the resolutions.

Yeah, checking is the annoying part, not the switch itself. Do you usually go through it manually every time the UI changes, or mostly before bigger releases?

Every time I make some changes to UI elements.

This is important for web games. There are a lot of problems. System zoom and browser zoom interfere with how this is handled.

Problems I usually do not see for downloadable games. A downloadable might run internally on resolution A and just scales up or down to resolution B for the screen.

Actually using the native resolution, like a widescreen display, is harder. Is there no css like function in those game engines? Where you say, this ui element is supposed to be rendered at 10% screen height? Do you really spell out the pixel height and need to test this out for different resolutions? I would assume that game engines over the years would solve this and make this more plug and play for developers.

Yeah, Canvas Scaler handles a lot of it. I’m mostly curious about weird aspect ratios and text-heavy UI.

Also, do you usually re-check new builds manually?

I am more like a victim of non tested resolutions ;-)

Mostly web games, but a lot of games are not made to have bigger font size. And a friend of mine has a widescreen display. The horrors. Either they are stretched or have black bars. Some games though do support this. They really do have a wider rendered vision area (speaking about 3d first person view).

I imagine some developers sitting on a multi display setup huching over, almost nosing the screen and deciding, yep, that 5 pixel size font will do, since it works on my 8k display.

Anyway, you speak of resolution. But changing resolution will not make text appear larger, only sharper, unless you are on a browser game or it is an old game that does this by pixel size fonts and the resolution really ups up the size, because the pixels were odd. I remember needing to play Civilisation V in an odd resolution because of that. Scaling the UI was handled very badly in that game and the solution was changing the hardware resolution the game thought it would render on.

Worth flagging the web export case, because it quietly breaks the assumption underneath the tool and nobody has said it outright yet. I ship a browser game rather than Unity, so take this as the web angle rather than a Unity answer.

In a browser there is no single thing called resolution. There are three numbers, and the bugs live in the gaps between them: the CSS size of the canvas element, the size of its drawing buffer, and devicePixelRatio, which multiplies one into the other. A downloadable game has one resolution. A web build has a CSS size times a DPR that the user can change underneath you. Browser zoom changes it. OS display scaling changes it. So you never get 1280x800, you get 1280x800 at 1, at 1.25, at 1.5, at 2, and at whatever fraction a Windows laptop happens to be set to.

That matters for your matrix specifically. Replaying a flow across a list of resolutions varies the axis that produces layout bugs, and those are the cheap ones, the ones a screenshot diff was always going to catch. The axis that produces the expensive ones is DPR at a fixed resolution. 1280x800 at DPR 1 and 1280x800 at DPR 2 are the same layout and four times the pixels, so what breaks is not the layout at all, it is memory and frame time. In a tab that is not a slowdown either, it is the tab getting killed, because there is no swap to page out to the way a native client has.

Which is why we clamp devicePixelRatio rather than honouring whatever the display reports. Uncapped on a high-DPI screen it is the easiest way there is to quadruple your buffer for no visible gain.

The other failure a same-DPR screenshot diff cannot see is the CSS size and the buffer size disagreeing. Nothing errors, the canvas is just soft, and it reads as an art problem rather than a code one 🔎

So the question I would actually put to you: does the recorder capture devicePixelRatio as part of the recorded environment, or only the pixel dimensions? If DPR is a first class axis sitting alongside resolution, this is useful to anyone shipping a web build. If it is not, it will find the cheap bugs and miss the ones that cost a weekend.

Good catch — DPR/display scaling isn't a first-class axis in what we record today.

Right now, Record captures the in-game screen size/resolution, and Replay tests different pixel resolutions by driving the RenderTexture directly (1280x800, 1920x1080, 1920x1200, 3440x1440, etc.).

What we don't currently capture or replay is Windows display scaling (125%/150%) or a DPR-equivalent value as part of the environment. So while we can compare behavior across different pixel resolutions, a same-resolution/different-scale issue is a real gap today, as you said.

I like your framing of Resolution and Display Scale as two separate test axes rather than grouping everything under "DPI issues." A matrix like 1920x1080 @ 100% / 125% / 150% makes sense as an orthogonal dimension on top of the resolution testing we already do.

Since GameCheck is Unity/native-first, the mechanics are different from the browser case you described, but the core point absolutely carries over: resolution and scale can produce different classes of failures and should probably be tested separately.

Adding this to the roadmap as a gap worth solving, not just a nice-to-have. Appreciate the detailed breakdown — genuinely useful way to think about it.

We stopped trying to assert correctness and started generating pictures instead. Every screen gets rendered at a fixed list of viewports and saved as a PNG, then we look at the sheet. Twenty resolutions takes about a minute to eyeball, and it catches the things an assertion never will, like a panel that technically fits but reads wrong. The one automated check that earned its keep was text against UI rectangles rather than text against text. Our first version compared labels to other labels and passed happily while a string ran straight across three empty panels. The itch specific trap is the embed. The iframe size you set on the project page is its own viewport, it is not the browser window, and it is the one that gets forgotten until someone actually plays the web build.