rickbatka / co-op-engine

A prototype engine for our planned co-op game. This is where we will make it work, make it network, and make it feel fun. No AI, level design, etc.
2 stars 0 forks source link

Fix annoying camera jitter when moving diagonally #22

Closed rickbatka closed 10 years ago

rickbatka commented 10 years ago

If you un-comment the camera follow code (player brain), you'll see some pretty bad jitter in the sprites when moving diagonally. I tried making sure none of the numbers are getting cast to ints (like in the set position call), they aren't.

Is the camera transform rounding to exact pixels when the player is moving in sub-pixel amounts? If so, how the heck do we get a smooth camera follow?

Actually I don't think that's it because the camera follows smoothly when only moving along one axis.

reddenx commented 10 years ago

Was a problem with when we were setting it, this was a minor change that was super easy to fix however when we go to implement a real follow camera, we need to have a "soft" follow, that slowly drags behind the character and doesn't have them static locked to the center (it gives a very good feel to the game) I think I'm gonna add a case for that now