Sign in to follow this  
Mekwot

XNA Jittering sprites (PLEASE HELP)

Recommended Posts

Mekwot    109

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
Mekwot    109

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
laztrezort    1058

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
jms bc    448

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this