All Projects → iamkun → Tower_game

iamkun / Tower_game

Licence: mit
💒 盖楼游戏 html5 canvas tower building game 🏢🏬🏦🏯🏰

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Tower game

One Html Page Challenge
Can you create something cool without modern tools?
Stars: ✭ 205 (-81.53%)
Mutual labels:  game, html5, canvas
Hilo3d
Hilo3d, a WebGL Rendering Engine.
Stars: ✭ 123 (-88.92%)
Mutual labels:  game, html5, canvas
Micro Racing
🚗 🏎️ 🎮 online 3D multiplayer neural networks based racing game
Stars: ✭ 100 (-90.99%)
Mutual labels:  game, html5, canvas
Phaser3 Docs
Phaser 3 Documentation and TypeScript Defs
Stars: ✭ 339 (-69.46%)
Mutual labels:  game, html5, canvas
Pacman
Pacman based on HTML5. 基于HTML5的吃豆人游戏 - 经典游戏开发样例
Stars: ✭ 707 (-36.31%)
Mutual labels:  html5, canvas
Html5 Animation
Foundation HTML5 Animation with JavaScript example code and book exercises.
Stars: ✭ 667 (-39.91%)
Mutual labels:  html5, canvas
H264 Live Player
A live h264 player for the browser (ideal for raspberrypi / raspicam )
Stars: ✭ 886 (-20.18%)
Mutual labels:  html5, canvas
Pixi.js
The HTML5 Creation Engine: Create beautiful digital content with the fastest, most flexible 2D WebGL renderer.
Stars: ✭ 34,982 (+3051.53%)
Mutual labels:  game, canvas
Zrender
A lightweight graphic library providing 2d draw for Apache ECharts
Stars: ✭ 5,122 (+361.44%)
Mutual labels:  html5, canvas
Monsterpong
Our entry for Github GameOff 2018
Stars: ✭ 23 (-97.93%)
Mutual labels:  game, html5
Fish
golang h5捕鱼游戏
Stars: ✭ 58 (-94.77%)
Mutual labels:  game, html5
Hilo
A Cross-end HTML5 Game development solution developed by Alibaba Group
Stars: ✭ 5,723 (+415.59%)
Mutual labels:  game, canvas
Jspaint
🎨 Classic MS Paint, REVIVED + ✨Extras
Stars: ✭ 5,972 (+438.02%)
Mutual labels:  html5, canvas
Korge
KorGE Game Engine. Multiplatform Kotlin Game Engine
Stars: ✭ 780 (-29.73%)
Mutual labels:  game, html5
Gameplane
基于Android的仿微信打飞机游戏
Stars: ✭ 592 (-46.67%)
Mutual labels:  game, canvas
Stormplane
✈️《沙漠风暴》是一款基于Android开发的纵版飞行射击游戏,以雷电(Shooting Game)为原型,参考微信打飞机大战,通过自定义的SurfaceView来实现游戏,游戏画面、音乐、战斗特效都不错(附带apk安装包,可直接运行)
Stars: ✭ 938 (-15.5%)
Mutual labels:  game, canvas
Openetg
Stars: ✭ 32 (-97.12%)
Mutual labels:  game, html5
Canvas Img Process
html5 canvas image process ( 3*3 kernel ) canvas卷积核测试 canvas图片后期
Stars: ✭ 31 (-97.21%)
Mutual labels:  html5, canvas
Minipaint
online image editor
Stars: ✭ 1,014 (-8.65%)
Mutual labels:  html5, canvas
Literallycanvas
A canvas in your browser. Literally.
Stars: ✭ 1,043 (-6.04%)
Mutual labels:  html5, canvas

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].