9781430247166_CO-01.jpg

Chapter 3

Your First Games

This chapter will be your first real look at how to design complete games. They’re short, simple games, but they contain all the elements of game design that you’ll be returning to again and again. Assigning input and output, decision making, keeping score, figuring out whether the player has won or lost, using random numbers, and knowing whether two objects are touching—they’re all here. You’ll also be taking a much closer look at variables and if statements and how to use functions to simplify a big program by breaking it into smaller chunks. By the end of the chapter, you’ll have all the skills necessary to build ...

Get Foundation Game Design with HTML5 and JavaScript now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.