Skip to main content
GameDev.net gamedev.net
🔒 Locked

XNA Jittering sprites (PLEASE HELP)

Started by Mekwot Dec 31, 2013 at 3:57 AM 5 replies 2.8k views
Original Post
Mekwot
Mekwot

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 ?

Mekwot
Mekwot

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

laztrezort
laztrezort

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.

jms bc
jms bc

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'?

The Four Horsemen of Happiness have left.
matthughson
matthughson

Can you post a video?

__________________________________[ Website ] [ Résumé ] [ [email=contact[at]matthughson[dot]com]Contact[/email] ][ Have I been Helpful? Hook me up! ]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.