Spielerando

Keep pixel art sharp when the game window has any size

Pixel art stretched to fit a window turns blurry or gets uneven pixels, with some columns twice as wide as others. This entry picks the size that keeps every pixel the same, centres the picture and says what to do in a window too small for it.

Why this works

Pixel art is a grid of equal squares. Only a whole-number zoom keeps every square the same size on screen; any other zoom must make some squares wider than their neighbours or blur them. A border is a small price for a clean grid.

When not to use it

Skip it for smooth, painted or vector-style art, which looks better filling the whole window. Also skip it on a phone held upright, where a wasted border would shrink the picture too much: stretch carefully there.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 17 lines of example code with 3 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "Keep pixel art sharp when the game window has any size" (read_entry action-pixel-art-integer-scale) in my game. Build it step by step, and show me how you checked that it works.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP