官术网_书友最值得收藏!

Chapter 2. Adding Interactivity – The Making of a Concentration Game

By definition, a game is interactive in some way. Players have to be part of it by doing things. The simplest form of interactivity is clicking or touching tiles in the game.

A Concentration game is simple to explain, but it will cover some new and important concepts, such as:

  • Creating multiple instances of game assets
  • Extending classes to improve its capabilities. Actually, there are no classes in JavaScript, but they are emulated using variables and prototypes
  • Adding gradients
  • Making assets react to clicks and touches
  • Changing sprite images on the fly
  • Adding text labels
  • Removing sprites from the game

By the end of the chapter, you will be able to create a full Concentration game using space for customization.

As the project created in the previous chapter is more than just a Hello World game and rather acts as a blueprint for all your future projects, you'll start building our Concentration game out of the previously finished project.

主站蜘蛛池模板: 浙江省| 湘乡市| 鹤山市| 措勤县| 渝北区| 三亚市| 临潭县| 南昌县| 永嘉县| 三原县| 珠海市| 荃湾区| 平潭县| 宝坻区| 收藏| 宝应县| 苍山县| 平昌县| 云梦县| 平塘县| 呼玛县| 渭源县| 宣汉县| 延安市| 吴堡县| 新密市| 古田县| 新乐市| 台北县| 岳普湖县| 安达市| 宜丰县| 和静县| 巢湖市| 泰和县| 商丘市| 噶尔县| 琼结县| 怀化市| 株洲市| 姜堰市|