Low resolution games and movement stutter

NightFrost

Member
When making low resolution games, for example 480 by 270, and blowing them up to fullscreen, it quickly becomes apparent that slowly moving objects have some stutter to them because individual pixels are so large. I've been thinking about solutions to this problem and wondered if anyone has tackled this same thing and what their solutions might have been.

My current line of thought is to do subpixel movement (so to speak). The rooms and all art assets would be blown up by some factor. Moving objects would be allowed to move in single pixel steps, but code would enforce alignment to simulated pixels. That is, even if the player just quickly taps a direction, their character will move several subpixel steps to align itself to a virtual low res pixel boundary.

This is pretty much the only solution I can come up with, but it seems a pretty complex arrangement just for the sake of smoother apparent motion. Are there any other methods people have successfully used to solve this?
 

Kepons

Lost The Bet
GM already supports subpixel rendering, but it does sometimes tend to produce visual artifacts when things are being drawn at non-integer positions. In my opinion, having things snap to the big pixels isn't necessarily a bad thing; it provides more consistency and a retro look if you're aiming for it.
 

RangerX

Member
Doubling your assets size should be wayyyyy enough to smooth things out. I am pretty sure leaving your game "as is" is probably good anywyas. Its not like a 60fps NES or SNES game doesn't look smooth on a big screen.
With that said, what you see also might come from something else. Do you round the position of your character or objects that moves once they more? Cause this can prevent some movement stuttering in may cases.
 

NightFrost

Member
Yes, the positions are rounded when sprite draw is executed in draw event, and further, color interpolation is turned off. I should have mentioned that when the game is allowed to run in a window sized to room resolution (480x270) the motion is smooth. The stutter is a visual consequence of pulling it up to fullscreen size and moving at slow speed. It starts to get noticeable at speeds of 0.33 pixels per frame and very noticeable at 0.15 pixels per frame. Scaling is done with a scaler shader taken from the old forum (this one to be precise).
 

RangerX

Member
So there is your problem. Many people can do such shaders or other solutions thinking it works but they don't notice the drawbacks or don't care. But there's no magic, there will ALWAYS be consequences when the game isn't resized at an integer value. Always, no matter the solution used. It becomes a choice for you the designer producer. Do you want your game "pixel perfect" at all time, native and smooth on any screen of this world - OR - maybe have an easier solution but with somewhat flawed results (that might not necessarily impact sales or bother many people). Anyhow, for me there's no other solutions that are acceptable outside being pixel perfect and smooth if I am making a pixel art game.
 

NightFrost

Member
Well yes, I agree that there is no way to make a pixel perfect game for every screen. (Pixel perfect being defined as every enlarged pixel being of the exact same size.) One can't consolidate every screen size to integer multipliers. For example, 1080 versus 1050 tall screens. That's why I made the base game 270 tall, it scales with an integer of 4 to the common type of 1080 making every virtual low res pixel 4x4 pixels (and yes, I was curious if the shader worked, so I counted pixels across and down). Running the game windowed doesn't feel like an acceptable compromise to me just to achieve this.

Now, while it would be interesting to talk about how to make a low res game look as good as possible on multiple resolutions - the shader is one solution - it is not the topic at hand.
 

RangerX

Member
Then you understand your problem and know what your solutions are. The graphical deformation you get cannot be solved otherwise. You basically have 3 solutions:

- Keep that shader and to hell with those half looking pixel.
- Have your game letterboxed at certain sizes but always looking perfect. (to most pro and elegant solution in my opinion)
- Use interpolation to "hide" the little defects (but making the whole thing more blurry).

Thinking about it you could also overscan your game at certain specific resolutions. You could also like quadruple your assets size and not care about the 1/4 smaller looking pixels that would appear.
 
Top