You are previewing Learning HTML5 Game Programming: Build Online Games with Canvas, SVG, and WebGL.

Learning HTML5 Game Programming: Build Online Games with Canvas, SVG, and WebGL

Cover of Learning HTML5 Game Programming: Build Online Games with Canvas, SVG, and WebGL by James L. Williams Published by Addison-Wesley Professional
O'Reilly logo

4. How Games Work

Trying to define exactly what a game is and isn’t is much more difficult than it seems. Although we may think of games as being purely for competition or entertainment, they actually encompass a lot more. A simulation that determines whether a building is constructed soundly could be thought of a game, as can trying to predict how people will react to certain stimuli. The best all-inclusive definition I could come up with is that a game is a form of interaction with goals and structure. Building upon the lessons we learned about Prototype and its approach to object-oriented programming, we will be using the Prototype-based Simple Game Framework (SGF) to create the games in this chapter. SGF was chosen because the API is complete ...

The best content for your career. Discover unlimited learning on demand for around $1/day.