Strange placement problems while zoomed in
I've been dealing with a problem for the past several days, and I'm getting to my wits end trying to get to the source of it.
Here is a photo showing the problem, as well as what it should look like. EDIT: The debug values stand for:
x/y = Player's X and Y
screen_scale = the global scaling factor for the application surface
window_w/h = Window width/height
screen_w/h = Screen/view width/height
screen_x/y = Relative position in the window where the application_surface is drawn
view_x/y = Relative position in the room where the view is placed
cam_x/y = Relative position in the room the camera object is placed
As you can see, the tiles are being placed just one pixel off when the camera view is set to certain sub-pixel positions. The tile scales are not changing (and are whole numbers), and the tile positions do not change either (and are also whole numbers, floored).
I have been manually setting and drawing the application_surface (you can see some of the debug values on the left), but this also occurs when using GMS2's default scaling functions. The "keep aspect ratio" option is checked in graphics settings, and the "generate mipmaps" and "border size" options in texture groups do not help/hinder.
The only thing that gives me a hint as to what is going on, is the "interpolate colors between pixels" produces a constant, fuzzy border between tiles, no matter what position/scale the camera is in see here. Keep in mind, this fuzzy line is even seen when no scaling is occurring see here.
Has anyone ever experienced a problem like this? My project is only barely starting, so nothing is really added besides basic movement, world-drawing, and the camera basics. I can supply code, if needed.
Posted Oct 10, 2019, 3:14 AM UTC · edited
Have you read this?
https://www.yoyogames.com/blog/3/seamless-tile-scaling-in-gamemaker