- HTML5 Game Development HOTSHOT
- Makzan
- 339字
- 2021-12-08 12:42:43
Mission briefing
We are going to create a matching game. This game presents a combination of patterns to the player, and some of these patterns overlap each other. Players analyze the patterns and then select them in the correct sequence so that the composition matches the provided one. You may visit the URL http://makzan.net/html5-games/color-quest/ to play the example game in order to have a better understanding of what we will build throughout this project.
The following screenshot shows the final result of this project. The upper part is a timer, the part to the left shows the quest, the right part is the composition of the player, and the lower part is the deck of patterns.

Why is it awesome?
A simple matching game like this is a perfect way to get you warmed up with the HTML5 games' development rhythm. What we will learn in this project is the foundation to build more complicated games later in this book.
This game uses what we are familiar with: HTML element interaction and styling in CSS. What's new, is JavaScript logic. This project will show us how to convert the game rule into code. We will also learn how to separate logic into different parts with different responsibilities.
Your Hotshot objectives
We'll perform the following tasks in this project:
- Creating the HTML structure
- Managing the game scenes
- Representing the quest pattern composition
- Placing the patterns on the deck
- Selecting the pattern
- Comparing players and compositions of the quest
- Showing different quests
- Counting down the game
Mission checklist
In this game, we are going to stick to plain JavaScript without using a library. This will help us get started with a basic foundation in JavaScript.
Note that writing JavaScript for games is a little bit different from writing it for a web page. Game logic requires well-structured code to ensure the logic is easy to read and maintained. The following essays provide an in-depth discussion on writing JavaScript in the right way:
- JavaScript best practices: http://www.thinkful.com/learn/javascript-best-practices-1/
- JavaScript the right way: http://www.jstherightway.org
- Dreamweaver CS3 Ajax網(wǎng)頁(yè)設(shè)計(jì)入門(mén)與實(shí)例詳解
- 機(jī)器學(xué)習(xí)及應(yīng)用(在線實(shí)驗(yàn)+在線自測(cè))
- 手把手教你學(xué)AutoCAD 2010
- 大數(shù)據(jù)時(shí)代的數(shù)據(jù)挖掘
- Photoshop CS3特效處理融會(huì)貫通
- 大學(xué)計(jì)算機(jī)應(yīng)用基礎(chǔ)
- C語(yǔ)言寶典
- 項(xiàng)目管理成功利器Project 2007全程解析
- 手機(jī)游戲程序開(kāi)發(fā)
- 云計(jì)算和大數(shù)據(jù)的應(yīng)用
- Linux Shell Scripting Cookbook(Third Edition)
- Cloudera Hadoop大數(shù)據(jù)平臺(tái)實(shí)戰(zhàn)指南
- Hands-On DevOps
- Learn Microsoft Azure
- FreeCAD [How-to]