Chapter 1. Building a 2D Game Engine

Game development is analogous to architecture and engineering. Just as an architect designs a construction project, such as a bridge or a skyscraper, so a game designer or game architect designs game construction projects, with many of the same designer workbench tools. Just as a construction engineer builds the bridge or skyscraper designed by an architect, so a software engineer builds the game created by the designer. Game development involves art and engineering.

As I’m sure you would agree, a construction engineering team can do nothing on their own without a blueprint created by an architect; they cannot even start working on a foundation without the blueprint. In like fashion, a software engineering team can do nothing on their own without a software blueprint (or design document).

Game development encompasses both of these fields, and game development methodologies have been formulated in the past decade to emulate the two fields of architecture and engineering. Many of the tools are the same. A game designer creates a design document (or blueprint) filled with concept artwork and highly detailed specifications for the game. A truly well-done design document could theoretically be passed on to an engineering team in order to completely build the game entirely from the design. But in practice, this is seldom the case because—like a skyscraper—a game is a monumental project that is just too large for a designer to completely encompass in the design up front. So, the architect or designer works closely with the engineering team during construction.

The example programs featured in this book are mostly derived from popular old arcade games, to aid in the learning process. When you are already familiar with the play mechanics of a game (that is, its funativity—a term borrowed from the game design field known as Ludology), then it is easier to work on the source code for a game because the gameplay is already familiar, and the rules are often simple. Examples include Atari’s classics such as Space Invaders and Breakout, which are something of a cliché in this field today, but that is only because these simple games are good as educational examples. (For instance, both of these games are useful when explaining sprite collision detection.)

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

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