Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Pixijs | 41,020 | 1,719 | 1,019 | 15 hours ago | 202 | July 12, 2023 | 193 | mit | TypeScript | |
The HTML5 Creation Engine: Create beautiful digital content with the fastest, most flexible 2D WebGL renderer. | ||||||||||
Phaser | 35,313 | 1,742 | 297 | a day ago | 154 | July 21, 2023 | 134 | mit | JavaScript | |
Phaser is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering. | ||||||||||
Hilo | 5,787 | 4 | 10 | a year ago | 31 | August 13, 2020 | 26 | mit | JavaScript | |
A Cross-end HTML5 Game development solution developed by Alibaba Group | ||||||||||
Phaser Examples | 1,660 | 1 | 2 years ago | September 20, 2022 | 17 | JavaScript | ||||
Contains hundreds of source code examples and related media for the Phaser HTML5 Game Framework. | ||||||||||
Canvas Test | 1,519 | 4 years ago | 4 | mit | HTML | |||||
🎮 happy canvas | ||||||||||
Pixel8 | 1,464 | 2 | a year ago | 26 | May 03, 2019 | 21 | JavaScript | |||
A collection of low-res primitives for creating art and games in React | ||||||||||
Phaser Ce | 1,258 | 641 | 67 | 9 months ago | 52 | December 13, 2022 | 51 | mit | JavaScript | |
Phaser CE is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering. | ||||||||||
Tower_game | 1,218 | a year ago | 2 | mit | JavaScript | |||||
💒 盖楼游戏 html5 canvas tower building game 🏢🏬🏦🏯🏰 | ||||||||||
Mk.js | 1,078 | 1 | 3 years ago | April 15, 2023 | JavaScript | |||||
Canvas implementation of basic fighting game which allows multiplayer over the network. | ||||||||||
Game | 1,024 | 13 days ago | 30 | mit | JavaScript | |||||
⚔️ An online JavaScript 2D Medieval RPG. |
English | 简体中文
a tower building game based on ES6 and Canvas (Tower Bloxx Deluxe Skyscraper)
The following are the default game rule:
In every game player starts with 3 hp. Every time a Tower block is dropped player is deduct 1 hp; game ends when hp is depleted.
Player is rewarded with 25 point for every succesful stacked blocks(Success). If a block is stacked pefectly (Perfect) on top of the previous one, then player rewarded with 50 points instead. Consecutive Perfects awards additional 25 points.
Note: Each Success or Perfect constitutes a floor
For example, the first Perfect awards 50 point. The second consecutive Perfect awards 75 points. The third consecutive Perfect awards 100 points. etc.
git clone https://github.com/iamkun/tower_game.git
cd tower_game
npm install
npm start
Open http://localhost:8082
in a web browser.
assets
directory.option
object in index.html
.Use following table of option
constants to complete customization of game rules.
Note: all constants are optionally included
Option | Type | Description |
---|---|---|
width | number | Width of game interface |
height | number | Height of game interface |
canvasId | string | DOM ID in Canvas |
soundOn | boolean | If sound is on |
successScore | number | Points awarded for success |
perfectScore | number | Additional points awarded for perfect |
hookSpeed | function | Speed of hook's movement |
hookAngle | function | Angle of hook |
landBlockSpeed | function | Speed of block sway |
setGameScore | function | hook for current score |
setGameSuccess | function | hook for number of current succesful game |
setGameFailed | function | hook for number of current failed game |
Speed of hook's movement This function takes in two parameters, currentFloor and currentScore, and returns a speed value.
function(currentFloor, currentScore) {
return number
}
Angle of hook This function takes in two parameters, currentFloor and currentScore, and returns a angle value.
function(currentFloor, currentScore) {
return number
}
Speed of block sway This function takes in two parameters, currentFloor and currentScore, and returns a speed value.
function(currentFloor, currentScore) {
return number
}
hook for current score This function takes in one parameters, score, and sets currentScore to score.
function(score) {
// your logic
}
hook for number of current succesful game This function takes in one parameters, score, and sets GameSuccess to successCount.
function(successCount) {
// your logic
}
hook for number of current failed game This function takes in one parameters, score, and sets GameFailed to failedCount.
function(failedCount) {
// your logic
}
MIT license.