This page is optimized for mobile devices, if you would prefer the desktop version just click here

0.13 Xna0124-using background images and color key transparency

Learn how to display a sprite in front of a background image and how to cause the background image to change at runtime. Learn the difference between the position and origin parameters of the SpriteBatch.Draw method. Also learn how to deal with and use color key transparency.

Revised: Sun May 08 15:53:42 CDT 2016

This page is part of a Book titled XNA Game Studio .

Table of Contents

Preface

This module is one in a collection of modules designed primarily for teaching GAME 1343 Game and Simulation Programming I at Austin Community College in Austin, TX. These modules are intended tosupplement and not to replace the textbook.

An earlier module titled Getting Started provided information on how to get started programming with Microsoft's XNA Game Studio.

Viewing tip

I recommend that you open another copy of this module in a separate browser window and use the following links to easily find and view the Figuresand Listings while you are reading about them.

Figures

  • Figure 1 . Property settings for green transparency.
  • Figure 2 . The UFO image.
  • Figure 3 . Reduced version of the alien planet image.
  • Figure 4 . The UFO approaching the planet from some distance away.
  • Figure 5 . Flying over the planet.
  • Figure 6 . Flying over the planet.
  • Figure 7 . Flying over the planet.
  • Figure 8 . Preparing to change course.
  • Figure 9 . Flying towards the camera very close to the surface of the planet.
  • Figure 10 . Still flying towards the camera very close to the surface of the planet.
  • Figure 11 . Almost touching the rings around the planet.
  • Figure 12 . Heading for home.
<< Chapter < Page Page > Chapter >>

Read also:

OpenStax, Xna game studio. OpenStax CNX. Feb 28, 2014 Download for free at https://legacy.cnx.org/content/col11634/1.6
Google Play and the Google Play logo are trademarks of Google Inc.
Jobilize.com uses cookies to ensure that you get the best experience. By continuing to use Jobilize.com web-site, you agree to the Terms of Use and Privacy Policy.