1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Make Your Sprite Move


Now that we have the player sprite loaded and displayed, and the player itself is a class, it's time to make it move. There are two ways to handle input: handling the events or getting the keyboard state. In this article, only events will be discussed.

Before getting started, be sure to download the part 2 example files. This is a different file than the previous articles, so you'll need to download the file linked to above. Note that all pixel art (such as the player, aliens and bullets) were created by Pixel_Outlaw.

  1. About.com
  2. Technology
  3. Ruby
  4. Tutorials
  5. Game Programming
  6. Make Your Sprite Move

©2014 About.com. All rights reserved.