Tower_game

💒 盖楼游戏 html5 canvas tower building game 🏢🏬🏦🏯🏰
Alternatives To Tower_game
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Pixijs41,0201,7191,01915 hours ago202July 12, 2023193mitTypeScript
The HTML5 Creation Engine: Create beautiful digital content with the fastest, most flexible 2D WebGL renderer.
Phaser35,3131,742297a day ago154July 21, 2023134mitJavaScript
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.
Hilo5,787410a year ago31August 13, 202026mitJavaScript
A Cross-end HTML5 Game development solution developed by Alibaba Group
Phaser Examples1,660
12 years agoSeptember 20, 202217JavaScript
Contains hundreds of source code examples and related media for the Phaser HTML5 Game Framework.
Canvas Test1,519
4 years ago4mitHTML
🎮 happy canvas
Pixel81,4642a year ago26May 03, 201921JavaScript
A collection of low-res primitives for creating art and games in React
Phaser Ce1,258641679 months ago52December 13, 202251mitJavaScript
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_game1,218
a year ago2mitJavaScript
💒 盖楼游戏 html5 canvas tower building game 🏢🏬🏦🏯🏰
Mk.js1,078
13 years agoApril 15, 2023JavaScript
Canvas implementation of basic fighting game which allows multiplayer over the network.
Game1,024
13 days ago30mitJavaScript
⚔️ An online JavaScript 2D Medieval RPG.
Alternatives To Tower_game
Select To Compare


Alternative Project Comparisons
Readme

LICENSE

English | 简体中文

Tower Building Game

a tower building game based on ES6 and Canvas (Tower Bloxx Deluxe Skyscraper)

Demo

Link to online Demo (Demo Link)

Mobile Devices can scan following QR code:

Game Rule

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.

Customizing the game rule

git clone https://github.com/iamkun/tower_game.git
cd tower_game
npm install
npm start

Open http://localhost:8082 in a web browser.

  • To customize image and sound resource files directly replace the corresponding file under assets directory.
  • To customize game rules modify the option object in index.html.

Option

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

hookSpeed

Speed of hook's movement This function takes in two parameters, currentFloor and currentScore, and returns a speed value.

function(currentFloor, currentScore) {
  return number
}

hookAngle

Angle of hook This function takes in two parameters, currentFloor and currentScore, and returns a angle value.

function(currentFloor, currentScore) {
  return number
}

landBlockSpeed

Speed of block sway This function takes in two parameters, currentFloor and currentScore, and returns a speed value.

function(currentFloor, currentScore) {
  return number
}

setGameScore

hook for current score This function takes in one parameters, score, and sets currentScore to score.

function(score) {
  // your logic
}

setGameSuccess

hook for number of current succesful game This function takes in one parameters, score, and sets GameSuccess to successCount.

function(successCount) {
  // your logic
}

setGameFailed

hook for number of current failed game This function takes in one parameters, score, and sets GameFailed to failedCount.

function(failedCount) {
  // your logic
}

License

MIT license.

Popular Video Game Projects
Popular Canvas Projects
Popular Games Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Javascript
Html5
Game
Canvas