• Advertisement
Sign in to follow this  

XNA Jittering sprites (PLEASE HELP)

This topic is 1507 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm making a 2d top down game in XNA. I have encountered a problem where, because iv scaled all of my sprites by a tiny bit. Whenever the player moves. all of the sorrounding sprites are jittering almost like flickering, the edges on them and such. Does anyone know what this could be and have any possible solutions ?

Share this post


Link to post
Share on other sites
Advertisement

Doesn't sound like scaling should be the cause - how have you done the scaling?  Are *all* sprites scaled, and *all* sprites jittery?  Can you comment out the code to scale, and everything works fine again?

Share this post


Link to post
Share on other sites

Yes if we go back to the original zoom level. everything is 100% fine. Its only when we zoom everything out by like 20% that we get jitters happening when we move

Share this post


Link to post
Share on other sites

Just throwing out some guesses:

 

Are you using a texture atlas?  Try messing with the texture wrapping modes, and possibly mipmapping settings - the sampler may be catching neighboring pixels in the atlas when scaling down.

 

Are you alpha blending and the borders of the sprites are (semi)transparent?  Check your blending settings, IIRC XNA uses premultiplied blending by default.

Share this post


Link to post
Share on other sites

I'd look at how you are converting world coords to screen coords. Print out the data over the course of a few seconds: x/y/top/left/height/width and whatever offsets you calculate. Do you round off anywhere? How is your zoom implemented? 

 

What kind of jitter? Is this 'Crackle of Life' or 'game vibrato'?

Share this post


Link to post
Share on other sites

Ensure your texture have mipmaps (in the properties for the texture in the content project).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement