Chapter 7

Getting to a Game

In This Chapter

arrow Designing a 2D game

arrow Building a game in steps

arrow Creating and using a custom library

arrow Building an array of same-type objects

If you know how to boil and stir, you’ve got some of the mechanics of cooking, but you’re still not a chef. It’s great to know how to build a sprite, how to add sound effects and timers, and how to read the keyboard. But you’re here to make a game. You’re here to find out how to design a game and then to actually build and implement that game design. This chapter walks you through the process of building a real game from beginning to end.

Building a Real Game

If you can build a sprite that moves under user control, you’re getting very close to a real game, but you still need a little more. A game really needs these elements:

check.png Some sort of plot: The plot doesn’t have to be complicated (PAC-MAN), but there has to be some kind of theme or setting.

Some kind of goal: The player must have a goal to achieve. Often a large goal ...

Get HTML5 Game Development For Dummies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.