Monogame’s Draw function doesn’t allow you to use floats if you’re using Rectangles for destination and source, which isn’t great if you’re using floats for the sprites’ positions. Their position has to be rounded, and this can result in some really ugly sprite jitter if you’re using a camera, and even worse if you’re using a low resolution stretched to fit the screen.
How can you fix this? Old games didn’t have this issue (I played all the way through Super Mario World recently, *96, and the only slight jitter I was able to notice was in the parallax-scrolling backdrops). What methods have you guys come up with if you ran into this issue? A method I was using for a while was stretching the screen all the way to 4096-width resolution (for a screen with a virtual resolution of something like 768 width), then fitting that inside the window, but that really seems like overkill, and will probably cause bad lag issues on some computers.
I haven’t run into this issue, but that’s because I’ve never tried having variable resolutions or a camera that can zoom in or out. What about using integers only for sprite positions? I think using ints only for 2D games makes sense. It’s what I use. You can still have variable resolution or camera, but all of the game logic happens on an integer scale.
Personally I would never use sprite scaling like they used to use back in the 90’s, I always thought it looked horrid, even back in those days.
To get a retro 2D look for a project I’ve currently shelved (but will return to at some point) I did all rendering to a retro low-resolution render target (640:360) and then scaled that up to either 720p and 1080p and it looked awesome since it up-scaled perfectly with no distortion. But again, no scaling for the individual sprites.
You may want to consider using 3D to achieve a 2D look (which is basically what Monogame does anyway), it shouldn’t be too much work but it would give you a huge amount of control over how to manage the scaling, like using floats for sprite positions!
I have never found this to be a problem. I am working on a ‘retro’ style parallax scroller at the moment.
Rather than using a low ‘virtual’ resolution for the screen and scaling screen coordinates up I use the ‘real’ screen coordinates for everything and scale up all the other gameplay values such as sprite velocities etc. This seems to work fine. Of course it’s not strictly ‘retro’ as the pixels in the artwork end up much bigger than the pixel grid being used on screen but at least everything looks smooth!
I used to make games for feature phones and there you were dealing with screen resolutions for 128128 up to current smartphone displays. If I’d have calculated everything at 128128 and scaled up it would have looked awful. The method described above works fine though.
Post screenshots I think issue lays in something else than you thing. (Wrong sampling for instance)