   Need new method for Sprite Animation
  Hi guysOkay, so I'm having a major problem with my sprite animation. In java btw. I have a standard animation loop and all that, but I just don't know how to implement "smooth" sprite animation. For example, when you press up once, then the sprite will jump up one tile. Now, the problem with this is that it isn't a smooth sort of glide that I desire.This is how my animation loop works so far:animation class fires an event,|the event listening thread invokes the repaint method|the overriden paint method calls an update method which updates the sprites based on keyboard input etc and draws everything to a image. The paint method paints this image to the panel.|The whole method repeats because of the event firing.Obviously that's it simplified. I also have a class to hold all information pertaining to a sprite character etc.So, as I said above this method doesn't lend itself well to the smoothing out of animation.So I had a new sort of plan I was going to ask about. What about an object that runs independently of everything, takes in all the input etc, and then another class which takes a "snapshot" of what that object looks like currently and displays it to the screen? Does this sound like a reasonable plan?The reason I devised this plan was because my current method doesn't work, but if you can point out a way to smooth out the animation using my method then please point it out. Also, I would like to keep my solution as OO (and scalable) as possible.ThanksPS: Sorry for long post.   
Quote:Original post by S-DawgWhat about an object that runs independently of everything, takes in all the input etc, and then another class which takes a "snapshot" of what that object looks like currently and displays it to the screen? Does this sound like a reasonable plan?Sounds like the Model-View-Controller design pattern.http://en.wikipedia.org/wiki/Model-view-controller   