[SDK Documentation] [Creating a complete game: Breakout]


Creating a complete game: Breakout

This document has been updated for use with GapiDraw 4.0 or later.
Last updated on October 6, 2008.



In this tutorial we will show you step by step how to create a complete game using GapiDraw: Breakout. You will find the finished application in the folder GapiDraw40\Samples\Win32\Breakout.

Breakout running in the Windows Mobile 5.0 emulator.


What you need to get started

To get started, you need:

  1. GapiDraw 4.0, which you can download online as an evaluation version
  2. Visual Studio 2008 Professional or Visual Studio 2005 Standard

It is strongly recommended that you use Visual Studio 2005 Standard or Visual Studio 2008 Professional instead of the older Embedded Visual C++ 4.0, especially if you would like to take advantage of the DirectDraw features of GapiDraw 4.0. If you use Embedded Visual C++ 4.0 you will not be able to take advantage of the new features of GapiDraw 4.0 such as windowed mode and hardware accelerated graphics through DirectDraw.

If you have not already done so, it is recommended that you apply for the Microsoft Empower for ISVs - a special deal where you will get the following tools for just $375:

  • Five licenses of Visual Studio 2008 Professional
  • One MSDN Premium Subscription, which basically includes all current Microsoft software
  • The full MSDN library
  • And more..

If you do not have access to Visual Studio 2005 Standard or Visual Studio 2008 Professional, you can download a free 90-day trial version of Visual Studio 2008 Professional from Microsoft to help you get up to speed quickly.


Creating a game in 12 steps

We will create the game Breakout in 12 easy to follow steps. We will describe each step, what it does, and also paste the source code and necessary steps to finish each step. We will not go through general game design principles in the tutorial (like subpixel accuracy and performance optimizations), but will focus exclusively on how to use GapiDraw to quickly and easily create a good looking game!

The 12 steps are:

  1. Skeleton application
  2. Game modes
  3. Scrolling background
  4. Border graphics
  5. Ball class
  6. Bat action
  7. Bricks
  8. Explosions
  9. Random shine effects
  10. Information text
  11. Button input
  12. Sound


Let's begin!

Let's move on with the first step - creating a Skeleton application!