Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs

ct.js

Create cool 2D games with a free game editor! · By Cosmo Myzrail Gorynych

What does the "Support High Pixel Density" checkbox do ?

A topic by HardWomen created 20 days ago Views: 25 Replies: 1
Viewing posts 1 to 2

What does the "Support High Pixel Density" checkbox do ?

The FitToScreen(Scaling with Letterboxing) already does a good job scaling it up.

If you want a high resolution game, you would naturally create a game at a higher resolution.   

So what is that checkbox for ? To upscale it beyond the powers of FitToScreen(Scaling with Letterboxing) using artificial intelligence ?

What exactly does it do ?

Developer

So what is that checkbox for? To upscale it beyond the powers of FitToScreen […]?

No, fittoscreen and that checkbox work together to become a mastermind :E And they do render a game at a higher resolution.

If you want a high-resolution game, you would naturally create a game at a higher resolution.

I guess you miss the fact that with fittoscreen, in “Scaling with/without letterboxing” modes, the pixels in your game are not physical pixels on your screen. Otherwise, it would be madness to work with coordinate conversions.

I will give a simpler example first: you can design your game on 320x240 canvas, and run it at higher resolutions for better interpolations and transforms.

Here is my vampire duke from SoulKnight game (not ct.js, but the rendering is the same) — it is pixelated and chunky on this scale, but the shovel is transformed in a way that it has nice diagonal lines, thanks to actual drawing resolution being bigger than the designed one:

You can go the opposite way: design your game on 4k canvas and run it on an ancient laptop, without performance issues as the rendered canvas will be scaled to match the resolution of the laptop.

This all is done automatically in fittoscreen so you can not give a heck about screen dimensions and focus on design and gameplay.

Now, towards high pixel density. If “Support High Pixel Density” is checked, the game will use higher pixel density if a screen allows that. Commonly such screens are Macbooks, 4k displays, and smartphones.

Example: At work, I have a 4k screen with UI scaling set to 1.5. The physical resolution of the screen is 3840x2160‬, but a game will render up to 2560x1440. With the checkbox turned on, a game will use up to all 3840x2160 pixels.

Whether or not to use this option is up to you, judging by how resource-hungry your game is — Mac runs most games smoothly on FullHD resolution but chokes in 4k mode as the workload quadruples. (Probably there will be a dynamic option for it soon so that players can toggle retina support, but rn it is a static option.)

Without the checkbox, games will output smaller resolutions, to match the resolution of regular-density screens. A game may appear blurry, especially on phones. You might have seen UIs on Windows with blurred text in some places and crisp in another — that’s the same issue.


Note that “Support High Pixel Density” works with any ct.fittoscreen’s modes, and even works without it.