Choppy Sprite Movement

0 favourites
  • 3 posts
From the Asset Store
Run and Jump in 3 Dimensions! Take your platformer to the next level!
  • I have my game set up in retro mode (320 x 180) and optimized for pixel art. I basically created a 16 x 16 sprite and attached the 8 direction behavior to it. Problem is, the movement of the sprite looks choppy and not smooth, and becomes even more prevalent the lower I set the max speed, and also especially when I move diagonally. Is there any way to get smooth movement and avoiding pixel blur/warping of the sprite?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The blurring is caused by the computer trying to keep the image as accurate as it can while trying to draw pixels between where they can be drawn. The computer can easily figure out where each pixel goes if you rotate the object 90 degrees because each pixel will be inside the pixel grid. But, if you try to rotate it 30 degrees, most of the pixels in the image will try to draw outside of the pixel grid so the computer has to interpret what the image should look like. This same thing happens if you pull your sprite up in a drawing program like photoshop. Have you tried changing the "Set Angle" property to 45 degrees instead of smooth? At 45 degrees, the computer can usually do a good job of interpreting how the image should look.

    Another option is to disable the "Set Angle" property and instead, draw your sprite facing each of the 8 directions and, in code, switch to the correct image dependent on the direction the character is moving.

    As for the jittery movement, either of the above options will reduce it dramatically. You will still see some because at the resolution your project is running at, the pixels are big enough to differentiate between so you are seeing the object move from 1 pixel to the next.

    This is a long one but I hope one of these suggestions helps. Good luck with you project.

  • Thank you. Horizontal and vertical movement looks much better now. Problem now is just diagonal movement. Instead of a smooth diagonal movement it moves one pixel up, then one pixel right in a sort of zigzag pattern. Is there any way to make it smooth?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)