Creating the Engine Project

We are going to create the core game engine project in this chapter and then expand it over the next half-dozen chapters to include all of the features we need to build advanced 2D games. The starting point is the core engine developed in this chapter, which will include WinMain, Direct3D initialization, D3DXSprite initialization, the basic starting game event functions (game_init(), and so on), timing and automatic frame-rate maintenance, and of course, a game loop. The great thing about doing all of this right now, at the very beginning, is that we will not have to duplicate any of this code in future chapters—it will already be embedded in the game engine.

Let’s get started creating the engine project so that we’ll have a foundation with which to discuss the future design of our engine. The Engine class is embedded in a namespace called Advanced2D. This namespace will contain all of the engine classes so there will not be any conflicts with other libraries you may need to use in a game. I will go over the project creation for two compilers in detail now and show you which libraries you will need to include in the project, so that you may refer to this chapter again for future projects. We will continue to build on the Engine project (which you are about to create) in future chapters.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset