Canvas 960x540, scaling and backgrounds #2

Closed
opened 2026-11-01 23:21:15 +00:00 by Weissstreifen · 2 comments
  • Lock the resolution to 960x540 (gameWidth/gameHeight): x2 = 1080p (the video output), x4 = 4K, both whole numbers. The window starts at 1920x1080 when it fits (otherwise 960x540) and scales the canvas by a whole number with nearest neighbour, with black bars around it.
  • Art pixels: shapes and sprites are drawn in art pixels of pixelSize x pixelSize canvas pixels (theme value, default 3: a 320x180 art grid, 6 screen pixels per art pixel at 1080p), so they look chunky while text stays sharp. Positions of shapes snap to the art pixel grid.
  • Text: the 9 px font (#20) at x1 (18 px at 1080p) for small labels, x2 or more for labels and titles. The theme chooses per role.
  • Background modes per scene: solid color (theme), green screen (#00ff00 or a theme color, with no color in the theme close to it) and transparent (for PNG frames with alpha).

Done when: resizing the window keeps the pixels square and sharp, and the three background modes can be switched in the scene file.

- Lock the resolution to **960x540** (`gameWidth`/`gameHeight`): x2 = **1080p** (the video output), x4 = 4K, both whole numbers. The window starts at 1920x1080 when it fits (otherwise 960x540) and scales the canvas by a whole number with nearest neighbour, with black bars around it. - **Art pixels:** shapes and sprites are drawn in art pixels of `pixelSize` x `pixelSize` canvas pixels (theme value, default 3: a 320x180 art grid, 6 screen pixels per art pixel at 1080p), so they look chunky while text stays sharp. Positions of shapes snap to the art pixel grid. - Text: the 9 px font (#20) at x1 (18 px at 1080p) for small labels, x2 or more for labels and titles. The theme chooses per role. - Background modes per scene: solid color (theme), green screen (`#00ff00` or a theme color, with no color in the theme close to it) and transparent (for PNG frames with alpha). **Done when:** resizing the window keeps the pixels square and sharp, and the three background modes can be switched in the scene file.
Author
Owner

We have to change the base resolution so that it can correctly scale to 1080p. thats probably the output of my videos

We have to change the base resolution so that it can correctly scale to 1080p. thats probably the output of my videos
Weissstreifen changed title from Canvas 1280x720, scaling and backgrounds to Canvas 960x540, scaling and backgrounds 2026-11-01 23:30:45 +00:00
Author
Owner

Changed to 960x540: x2 = 1080p, x4 = 4K, both clean. The export (#14) defaults to 1080p (x2).

Changed to 960x540: x2 = 1080p, x4 = 4K, both clean. The export (#14) defaults to 1080p (x2).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Weissstreifen/daviz#2
No description provided.