Chapter 9 of Beginning Game Programming teaches developers how to move sprites around the screens with different behaviors.
This example creates 3 different planet sprites, each with their own movement behavior. Mars stops when it hits the edge of the screen. Neptune ricochets off the edges. Jupiter wraps around the screen.
For added fun, you can click and drag the planets around the screen and they will change their velocity and direction when you let them go.
Click download now to get access to the following files:
Leave a comment
Log in with itch.io to leave a comment.