ARTICLE

Missile Command .NET

Posted by David Lambert Articles | Games Programming C# February 23, 2003
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#.
Reader Level:
Download Files:
 

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.

Login to add your contents and source code to this article
post comment
     
COMMENT USING
PREMIUM SPONSORS
DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and add new content to existing PDF documents from within your applications.
Get Career Advice from Experts
SPONSORED BY
  • PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.
Join a Chapter