Code Examples
  Home arrow Code Examples arrow Creating an Engine for Games for Windows
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Moblin 
JMSL Numerical Library 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
CODE EXAMPLES

Creating an Engine for Games for Windows
By: Sams Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 41
    2004-10-13

    Table of Contents:
  • Creating an Engine for Games for Windows
  • What is a Game Engine?
  • Breaking a Game Down into Events
  • Developing a Game Engine
  • The GameEngine Class
  • Source Code for the WinMain Function
  • Initializing Variables
  • HandleEvent Method
  • Put the Engine to Work
  • Resource.h Header File
  • Testing the Finished Product

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Creating an Engine for Games for Windows


    (Page 1 of 11 )

    Building a game engine organizes code in your games so that the game-specific code is isolated from the general Windows application code. Read on to see how to design and develop a basic game engine for Windows game programming. (From Beginning Game Programming, by Michael Morrison, 2005, Sams, ISBN: 0672326590.)

    MorrisonNote - While Pong gets credit for being the first publicly identifiable video game, I think it's safe to say that Space Invaders was the first video game to really captivate the world's imagination. Released in 1978 by Taito, Space Invaders was the original vertical shooter that set the stage for many an alien shoot-em-up to come. Space Invaders enjoyed such frenzied popularity in Japan that the country encountered a coin shortage and had to quadruple its supply of yen. Space Invaders still lives on today in quite a few modern games, as well as in revamped 3D versions of the classic original. In 2004, the original stand-up Space Invaders arcade game was re-released so that it could be enjoyed by a new generation of gamers—to ensure that the game would continue to rake in quarters, the cost was increased to 50 cents per play.

    A game is a specialized type of program, but it is still just a program written in a programming language. This means that you can create a game just as you would any other Windows program; for an example of a minimal graphical Windows program, check out the Skeleton application in Appendix C, "A Windows Game Programming Primer."

    Certain game-specific tasks must be carried out in all games. Therefore, it would be quite helpful to organize the code in your games so that the game-specific code is isolated from the general Windows application code. In isolating this code, it might also be useful to build in some cool features that apply solely to games. The idea I'm suggesting is that of a game engine, which is a grouping of program code that performs tasks common to games. This chapter guides you through the design and development of a game engine that you'll build on throughout the remainder of the book.

    In this chapter, you'll learn:

    • The importance of a game engine in game development

    • How to design and develop a basic game engine for Windows game programming

    • How to create an example that demonstrates the power of the game engine

    SamsThis chapter is from Beginning Game Programming, by Michael Morrison (Sams, ISBN: 0672326590). Check it out at your favorite bookstore today.

    Buy this book now.

    More Code Examples Articles
    More By Sams Publishing


     

    CODE EXAMPLES ARTICLES

    - Handling Animations and Bitmaps Using GDI+ f...
    - Download a Web Page using the WebClient
    - Creating a Chart using Data from a Database ...
    - The Basics of Charting with the MS Chart Con...
    - Searching Body Text with textRange: Enter th...
    - Searching Body Text with textRange: Building...
    - Searching Body Text with textRange, part 1: ...
    - First Steps in Programming
    - Programming in C
    - Quick Introduction to ASF,ASX, and Networkin...
    - SatView: Pointer Perfect, Part 2: Constructi...
    - SatView: Pointer Perfect, Part 1
    - Style Case Studies: Construction Unions
    - Creating an Engine for Games for Windows
    - Style Case Studies: Generic Callbacks





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
    Stay green...Green IT