I'm trying to set up an option that lets you double the in-game resolution, going from 600x480 to 1200x960.
Currently my stretch settings are Mode:viewport and Aspect:keep. Pixel snap is also enabled. I've played around with all options, but with no luck. I've also searched excessively both on these forums and other sites, and while I have found people with somewhat similar issues, none of the proposed solutions worked for me. The code I am using to change the window size is simply OS.setwindowsize(NewResolution)
The heart of the matter:
This is a screenshot of the game running at it's base resolution. It looks the way it's supposed to.
This is a screenshot of the game running at precisely double resolution.
The differences might not be immediately noticeable, but I've zoomed in on a specific example for convenience's sake.
This is what the pixels are supposed to look like, scaled up manually from it's original resolution.
And here's what the pixels look like at the doubled resolution, scaled up manually to preserve aspect ratio as well
As you can tell, some pixels that should have become 2x2 pixels have instead arbitrarily become 1x2 or 2x1 pixels.
If anyone can tell me what I can do to preserve the individual pixel aspect ratio when doubling the game's resolution, I would greatly appreciate it. Thank you in advance.
Just some additional information, the issue still persists. I've updated to godot 3.2.3, just on the off-chance this was a bug that had been fixed, but to no avail.
I'm using a Camera2D node to display the game, and if I keep the base resolution but have the camera be at x2 zoom (so that the sprites increase by the same amount), they look the way they're supposed to, with every pixel being at the appropriate 2x2. Obviously this still doesn't fix the problem, as playing at x2 zoom cuts off 75% of the game display, but I thought it was an interesting piece of information.
For the sake of clarity, this issue is not only for the specific purple-ship sprite I've posted in the screenshots, but for every sprite in the game.
The incorrect pixels are not consistent, and seem to change whenever the sprite moves, whether it by along the y vector or the x vector. Even if they move at exclusively whole integers, the sprites still morph. I set up a script that constantly prints out the Vector2D position to ensure that they weren't accidentally moving across any decimal vectors.
To completely ensure that I am increasing the resolution correctly, I've set up temporary code within the resolutionchange function, a single line of code stating
OS.setwindowsize(OS.windowsize*2), so that there can be no mistake that the resolution is exactly double.
Thank you for all the replies so far.