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

Getting Gaming With Rubygame

By

Loading and Displaying Images

Now that the main loop for Rubygame is up and running, it's time to put something meaningful on the screen. To do this, you can load images into surfaces. A surface is nothing more than an image in memory. These surfaces can be painted (or "blitted", short for block image transfer) onto other surfaces. and any surface can be painted onto any other surface, including the screen, which itself is a special type of surface. Loading images into surfaces and painting them onto the screen is the primary way of displaying things on the screen in Rubygame.

Before getting started, take a moment to download the example code with the image file required for this article.

  1. About.com
  2. Technology
  3. Ruby
  4. Tutorials
  5. Game Programming
  6. Loading and Displaying Images

©2014 About.com. All rights reserved.