Missile Command .NET


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.


Similar Articles