This is a simple example of how you can move sprites in a smooth periodic manner using the Sine function, compared to using linear movement. All code by me (@kriblo). See inside for commented code.