• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker Better View movement?

Anixias

Member
I have an issue that I've always worked around by allowing fractional view coordinates, although that distorts all of the artwork of the game.

Basically, I have an isometric view and I set the view to the round() of whatever position I want it at. When my player moves cardinally, it looks fine. If I walk diagonally, however, it looks like absolute garbage:

If you speed it up so that it's running at 144 fps, the motion blur because of the terrible jaggedy rounding stuff causes the whole game to look blurry.

What is a visually pleasing method of ensuring that the view is only on integer coordinates, and not have it look terrible when it moves non-cardinally? I also round() the player's position to ensure pixel-perfect artwork remains in-tact.

EDIT:
Changing round() to floor() or ceil() mitigates the effect on stationary objects but amplifies the effect on the player.
 

CloseRange

Member
you could also use fractional views but go to the global game settings, windows target, and make sure interpolate colors between pixels to off.
that's the setting that causes images to blur (for higher resolution images this can be a good thing but sometimes not good for pixel art)
 

TheouAegis

Member
Floor everything. ;)

If you floor the camera but not the player, then the camera will shift left, forcing the player to shift right/down if the player's coordinates are not integers. If you floor the player but not the camera, then the player will shift left/up when the camera's coordinates are not integers. Then you gotta play catch-up on the next step and the whole thing's a mess.
 

Anixias

Member
I am currently flooring all objects before they are rendered and then "unflooring" them back to the fractional position. I do something very similar with the view. It just causes a weird view jumping effect that makes everything blurry in 144fps (motion blur of my monitor). Slowed down, as in the gif above, it just looks odd.

Are you flooring the player's movement as well?
Yes.

you could also use fractional views but go to the global game settings, windows target, and make sure interpolate colors between pixels to off.
that's the setting that causes images to blur (for higher resolution images this can be a good thing but sometimes not good for pixel art)
The blurring effect is a side effect of having a 144hz monitor and having the game's view move awkwardly at 144fps. That option is not selected.

Floor everything. ;)

If you floor the camera but not the player, then the camera will shift left, forcing the player to shift right/down if the player's coordinates are not integers. If you floor the player but not the camera, then the player will shift left/up when the camera's coordinates are not integers. Then you gotta play catch-up on the next step and the whole thing's a mess.
I am currently flooring everything; all objects and the view

EDIT:
After removing all rounding and simply allowing floating point coordinates, stationary objects and the view itself move extremely smoothly, but the player that the view is following continues to jitter in a way that causes slight motion blur at 144fps.
 
Last edited:
Top