Home

Forum

Games

~~~~~~~~~~~~~

Chapter
Examples



Programming 2D Games

Official site of "Programming 2D Games" the book
by: Charles Kelly

Chapter 9 Enhanced Appearance

Scrolling Bitmap

A spaceship remains in the center of the screen as the stars behind it scroll.

  • Demonstrates scrolling an image that wraps around at the edges to allow infinite scrolling in any direction.

Scrolling Bitmap

download......(Source Included)

Parallax Scroll

A spaceship remains in the center of the screen. The planets behind the ship and the stars scroll at different speeds to provide the illusion of depth.

  • Demonstrates parallax scrolling to create the illusion of depth.

Parallax Scroll

download......(Source included)

Shadow

An airplane flies over the ocean with its shadow visible on the surface of the water.

  • Demonstrates using alpha transparency to create a shadow.

Shadow

Download......(Source included)

Reflection

An airplane flies over the ocean with its reflection visible on the surface of the water.

  • Demonstrates using alpha transparency to create a reflection.

Reflection

download......(Source Included)

 

Message Dialog

A message dialog is displayed on the screen with a test message and an OK button. Clicking the OK button or pressing the Enter key closes the dialog.

  • Demonstrates how to display the Message Dialog.

Message Dialog

download......(Source included)

Input Dialog

An input dialog is displayed on the screen with a message and a text input region. Entering the word ‘next’ displays a second dialog.

  • Demonstrates how to use the Input Dialog.

Input Dialog

Download......(Source included)

Dashboard Demo

A dashboard of gauges is displayed.

  • Demonstrates how to display each dashboard element.

Dashboard

Download......(Source included)


Creative Commons License
Programming 2D Games Examples by Charles Kelly are licensed under a Creative Commons Attribution 3.0 Unported License.

 

This website copyright © 2012 by Charles Kelly, All Rights Reserved

Last Updated:

24 May, 2013