Hello there,
I've run into an issue I am not sure how to fix and figured I should ask for some input. I am currently working on a 2D tile based game. Everything is designed and coded for 1920x1080 resolution and I use a View to adjust to different resolutions. I load tileset images and create the tiles from subrects. I had an issue previously with ugly borders on transparent images which I fixed by using a nearly black color as the alpha channel.
When I run the game in 1920x1080 everything looks great, as expected. The problem comes when I use lower resolutions. For example, my monitor is 1440x900, which would result in a downscale. With smoothing on the everything looks great, except I get black borders on some tiles:
I have researched this and from what I have found the issue has to do with smoothing. If I disable it, the lines are no longer there but the tiles look awful:
What exactly can I do in this situation? I have considered upgrading to SFML 2.0 and using RenderTexture to draw everything to an off screen buffer then applying smoothing to that, but from what I read nearly all Intel GPUs don't support that. I have also read I could potentially scale and cache the tiles at run time but I am unsure exactly how that would work. I also read something about the view potentially using floating point numbers, and I could remove the lines by down scaling and maintaining aspect ratio.