- 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.
推薦閱讀
- Python快樂編程:人工智能深度學習基礎
- Vue.js 2 and Bootstrap 4 Web Development
- DevOps入門與實踐
- 精通Python設計模式(第2版)
- Android Wear Projects
- Building Microservices with .NET Core
- 深入剖析Java虛擬機:源碼剖析與實例詳解(基礎卷)
- Python大學實用教程
- ASP.NET Web API Security Essentials
- JavaScript悟道
- 數字媒體技術概論
- Learning Cocos2d-JS Game Development
- Java程序設計入門(第2版)
- 優化驅動的設計方法
- LabVIEW數據采集(第2版)