Home

Forum

Games

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

Chapter
Examples



Programming 2D Games

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

Bonus Examples

Spacewar v2.0

The Spacewar game using the ship model from the cover art by Nicholas R. Wilson and a ship model created in Blender by the author.

  • The game has a resolution of 1280x800.
  • The star is animated.

Spacewar 2.0

download......(Source included)

 

Asteroid Race

A game inspired from the book cover art. This is version 0.8. It is not a complete game.

  • The game has a resolution of 1280x800.
  • Demonstrates the use of sprite scaling to simulate 3D depth.
  • Ship model by Nicholas R. Wilson
  • Asteroid model created in Blender by the author

Asteroid Race

download......(Source included)

Texture Filter Demo

A 4x4 and an 8x8 sprite are displayed. Move left and right with the arrow keys. Change scale with + -. Change the pixel sampling filter with F.

  • Demonstrates the effect the different texture filters have when drawing sprites. The only noticeable difference will be when POINT filtering is used.

Texture Filter

Download......(Source included)

Gamepad Demo

Displays the state of the analog and button inputs on the currently connected controllers.

Gamepad Demo

Download......(Source included)

Particle Demo

Creates a ParticleEmitter class to display particles. The ParticleEmitter class supports the following:

  • The number of particles may be set.
  • The particles may collide with other objects.
  • Each particle may be animated.
  • The particle creation rate may be varied.
  • The particle Max and Min life may be set.

Particle Demo

download......(Source included)

Line Demo

Demonstration of the line drawing feature in v3.5 and later of the game engine.

Line Demo

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:

23 October, 2014