2D pixel game jittering and scaling

esdoSMCesdoSMC Posts: 11Member
edited February 4 in 2D

I need some help regarding 2D pixelated games.

Should I scale up the pixel art and use higher resolutions for my game screen or can i keep the pixel art at scale 1:1 and just use a smaller resolution?

Right now im with scale 1:1, wich makes particles look nice (because they dont overlap with each other) but, if a have a non-moving object (like an item on the ground, a kinematicbody2d that does not move) and move the camera, the object jitters a litte bit. The tilemap, however, does not jitter.
Im wondering if scaling up all the pixel art and using custom particles (that would snap to grid positions) would fix my jittering problem while still allowing good-looking particles. Or is the jittering caused by anything else?
I cant just convert my project to a higher scale because it would take A LOT of time and there could be some unwanted consequences im unaware of, so I'd rather ask here first ( in case ur wondering why i dont just test myself).

Also, is that kind of kittering acceptable on a 2D game? Is it expected?

i put a gif showing the issue. Thanks!


  • MegalomaniakMegalomaniak Posts: 1,087Admin

    what are the jittering objects parented to? If they are parented to the tilemap I'd expect them to inherit the location from the parent so I'm not sure why they would jitter so much.

  • esdoSMCesdoSMC Posts: 11Member
    edited February 4

    They are children to a "world" node, just like the tilemap. So the scene is setup as follows:

    ~~ Tilemap
    ~~ Items(KinematicBody2d)

    The world node is not children of anything.

  • esdoSMCesdoSMC Posts: 11Member

    Any help:??

  • MegalomaniakMegalomaniak Posts: 1,087Admin
    Answer ✓

    The jitter probably results from flotaing point (im)precision. A quick google search brought up this:

    It's a bit old, but maybe it can give you some ideas.

    ps. For some reason I thought I had already replied to your previous post, but I guess I must not have pressed post comment. :neutral:

  • esdoSMCesdoSMC Posts: 11Member
    edited February 8

    I did see that post, but I didnt understand it. Now I found out that if I round my items position when they aint moving, they stop flickering.

    However, from a design standpoint, is it better to have a pixel perfect game (lowres) or I'm better off scaling up everything to get more precise object positions? Im making a 2d plataformer

Sign In or Register to comment.