- Learning Cocos2d-JS Game Development
- Emanuele Feronato
- 172字
- 2021-08-06 19:43:53
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.
推薦閱讀
- Android Wearable Programming
- Flask Web全棧開發實戰
- Visual FoxPro 程序設計
- ArcGIS By Example
- Learning ArcGIS for Desktop
- Visual FoxPro程序設計習題集及實驗指導(第四版)
- SSM開發實戰教程(Spring+Spring MVC+MyBatis)
- Learning jQuery(Fourth Edition)
- Hands-On Neural Network Programming with C#
- Kotlin Programming By Example
- 計算機應用技能實訓教程
- Instant jQuery Boilerplate for Plugins
- Sails.js Essentials
- SFML Game Development
- 你必須知道的.NET(第2版)