Home | Gaming | Programming | Play Online | Contact | Keyword Query
Games++ Games & Game Programming

GAMES++
Games++ Home
Games++ Gaming
Games++ Programming
Beta Testing Games
Free Online Games
Hints & Cheats

BROWSER UTILITIES
E-mail This Page
Add to Favorites

SITE SEARCH

Web Games++

AFFILIATES
Cheat Codes
Trickster Wiki
Game Ratings
Gameboy Cheats
PlayStation Cheats
BlackBerry Games
Photoshop Tutorials
Illustrator Tutorials
ImageReady Tutorials

ADVERTISEMENT

Missile Command using C# and .NET

By David Lambert

                                                                                              
Source code: MissileCommand.zip 109 KB

Introduction

Missile Command .NET is a simple video game written in C# using GDI+ for graphics. It's a tribute to the classic Missile Command game by Atari. I wrote this game to teach myself more about programming in C#.

What can you learn from this code?

This code demonstrates:

  1. How to use the System.Drawing namespace to render simple yet effective graphics.
  2. How to use the System.IO namespace to read from and write to text files.
  3. How to implement multiple forms and pass information between them.
  4. How to implement a window menu bar in code.
  5. How to use a Timer component to trigger an event at a regular interval.
  6. How to detect a collision between graphics using the Bitmap.GetPixel method.
  7. How to interact with various input controls on a form.
  8. How to pull good performance from a C# Windows application by eliminating boxing/unboxing ('new' keyword) from core code, avoiding implicit and explicit type conversions, and using the StringBuilder class to build strings instead of the '+' operator.

About the Author: David Lambert is a web developer with 7 years of professional IT experience and 1 year of experience in ASP.NET / C#. He's also author of Sarnik - The Zorion Chronicles, a DHTML roleplaying game at http://www.sarnikdhtml.com.

Copyright © 1998-2007, Games++ All rights reserved. | Privacy Policy