this is the game in fullscreen. you can see an artifact on the left side of the characters face where the pixel is skewed
this is the game maximized, where it seems to not be happening.
this is my game’s resolution settings. my screen resolution is 1920x1080, which is 16:9. my game resolution is 256x144, which is likewise 16:9.
is it because scaling 256 into 1920 is a non-integer? if so, how can i account for fullscreening for different screen resolutions? 1080p is pretty standard, but there will be players using other resolutions.
is there any way to get fullscreen resolution to respect the integer scale of the game, and just add black bars when it’s a non-integer?
as it is, it seems like true pixel-perfect games are impossible in fullscreen, which is very undesireable.
You would have to calculate the best resolution that would fit on the screen, but I don’t know of a way to detect the actual screen size… You could try to maximize the window and then get the size of the window with ScreenWidth() and ScreenHeight(), but that would still exclude any UI elements that would still be outside of a maximized window (such as task bar).
Best option might be to let the player select screen size manually. Also, making sure that your camera and objects stay on integer coordinates will be necessary to prevent any possible doubling. In fact it looks like that’s what is happening in your screenshot, since the rest of the scene does not appear warped.
not sure how would go about calculating the best resolution to fit on a given screen, cuz everyone will have different screens. 1920x1080 is most common on PC, but there are folks who have laptops or whatnot that have different resolutions.
i tried a workaround to blow up all my assets 5x to get a target resolution of 1280x720, thinking that even though that doesnt divide evenly into 1080 the size of “pixels” would hide the weird artifacts, but they still happen when in fullscreen.
i guess i can just disallow fullscreening entirely, but that is not what i want
Have you tried unchecking “Update resolution during the game to fit screen or window size”?
yah i have fiddled with all those checkboxes, including update resolution.
fullscreen has issues with pixels no matter what i do. for now i am just disallowing fullscreening until i can come up with some method to render pixel perfect to fullscreen
Are you sure you have to disable it? Many players will prefer to use fullscreen even if there are a few weird pixels.
There’s a good discussion about this topic here:
One suggestion made there was to increase resolution and then zoom the camera, which I think might help in your case (no need to scale up the assets, just the game resolution + camera zoom).
It is hard to see in the screenshots, but I still suspect that the player sprite might be on a non-integer coordinate. If you are using movement behaviors such as Top-Down Movement, then the player will move with floating-point accuracy regardless of game resolution. So for example the player X coordinate could be 12.5, or 12.00000123. If this happens then you’ll see warping on the player sprite but not the background, and should be fixable by restricting the sprite to whole coordinates.
There is no perfect screen resolution.
People with 16:10 displays or wieird 1366x768 resolutions basically mess up any chance on getting a one size fits all resolution.
The most compatible low resolution for 16:9 is 320x180 or 640x360 for a higher res starting base.
Both will integer scale into 720/1080/1440/4k
There is also a ‘nearest integer’ scaling mode in the works on the github, but no ETA on when/if it will ever be released.