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  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
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: 5 stars5 stars5 stars5 stars5 stars / 43
    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


       · I haven't read it yet, but only by the title i love it !when i've read it i'll...
     

    CODE EXAMPLES ARTICLES

    - Bipartite Graphs
    - Connectivity in Graphs
    - The Ford-Fulkerson Algorithm
    - Critical Paths
    - The Bellman-Ford and Roy-Floyd Algorithms
    - Shortest Path Algorithms in Graphs
    - Minimum Spanning Tree
    - Articulation Edges and Vertexes
    - Circles and Connectivity in Graphs
    - Depth-First Search in Graphs
    - Breadth-First Search in Graphs
    - The Prufer Code and the Floyd-Warshall Algor...
    - An Insight into Graphs
    - Coding a Custom Object with WSC
    - Creating a Custom Object with WSC





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek