Stone Fight it's a game where 2 players throws stones by turns to each other across a wall placed in the middle of the screen, the objective is to kill the other player by decreasing the HP.
CANVAS, The mvp is a game where at least one player can throw a stone and hit the other player.
- Strenght and angle dynamic modulator
- Sprites
- Multiple leves with random wall
- splashScreen()
- destroyGameOver(if)
- buildSplash()
- addEventListener(startGame)
- starGame()
- destroySplash()
- destroyGameOver()
- create new Game()
- game.start()
- gameOver()
- destroyGame()
- buildGameOver()
- addEventListener( if splashScreen, else startGame)
Game(){
this.player;
this.rock;
this.wall;
this.canvas;
this.ctx;
this.gameOver;
}
Game.prototype.startLoop(){
loop()
}
Game.prototype.updateCanvas(){
}
Game.prototype.clearCanvas(){
}
Game.prototype.drawCanvas(){
}
Game.prototype.checkAllCollisons(){
}
Game.prototype.finishGameCallback(){
}
Player(){
this.x;
this.y;
this.size;
this.canvas;
this.ctx;
this.lives;
this.direction;
this.speed;
}
Player.prototype.updateXPosition(){
}
Player.prototype.draw(){
}
Player.prototype.setDirection(){
}
Player.prototype.setLives(){
}
Player.prototype.blockPlayer(){
}
Player.prototype.checkCollisionWithWall(wall){
}
Rock(){
this.x;
this.y;
this.size;
this.canvas;
this.ctx;
this.gravity;
this.deceleration;
this.shotSpeed;
}
Character.prototype.draw(){
}
Character.prototype.throwPhysics(){
}
Wall(){
this.x1;
this.x2;
this.size;
this.canvas;
this.ctx;
}
Wall.prototype.draw(){
}
- Main - buildDom
- Main - buildSplash
- Main - addEventListener
- Main - destroySplash
- Main - 3 states transitions
- Game - loop
- Game - Create Player,rock and wall
- Main - GameWon
- Main - destroy Game
- Main - GameWon RESTART
- Main - removeGameWon
- Game - restartGame
- Game - addEventListener
- Wall - create
- Player - create
- Player - move
- Player - collision
- Rock - create
- Rock - throw (physics)
- Rock - collision
- Game - check win
URls for the project repo and deploy Link Repo Link Deploy
URls for the project presentation (slides) Link Slides.com