Giter Site home page Giter Site logo

surviving-earth's Introduction

Surviving Earth

Description

Survivng Earth is a game where the player must fend off the asteroids from the Earth to save it. The game ends when an asteroid hits the earth.

MVP (DOM - CANVAS)

  • game has an earthball which is located in the bottom
  • asteroids target the earth
  • per mouse click on asteroids they explode
  • asteroids appear randomly from the left,right,top of the screen
  • asteroids change speed randomly
  • number of asteroids increase gradually and randomly
  • when one asteroids hits the earth the game ends
  • score counts how many asteroids were hit

Backlog

  • add music
  • Multiple levels to increase the difficulty- more asteroids appear which should not smashed

Data Structure

main.js

  • buildSplashScreen () {}
  • buildGameScreen () {}
  • buildGameOverScreen () {}

game.js

  • Game () {}
  • Loop () {}
  • checkCollisions () {}
  • clearCanvas () {}
  • updateCanvas () {}
  • drawCanvas () {}
  • GameOver () {}

ship.js

  • asteroids () { this.x; this.y; this.direction; this.interval }
  • draw () {}
  • move () {}
  • speed () {}
  • amount(){}
  • checkScreenCollision () {}

earth.js

  • Earth () { this.x; this.y;

    }

  • draw () {}

  • checkCollision () {}

States y States Transitions

Definition of the different states and their transition (transition functions)

  • splashScreen
  • gameScreen
  • gameOverScreen

Task

  • main - buildDom
  • main - buildSplashScreen
  • main - addEventListener
  • main - buildGameScreen
  • main - buildGameOverScreen
  • game - startLoop
  • game - buildCanvas
  • game - updateCanvas
  • game - drawCanvas
  • asteroids - draw
  • asteroids - move
  • asteroids- increase
  • asteroids-speed up
  • asteroids- addEventListener
  • game - checkCollision
  • earth - draw
  • earth - checkCollision
  • game - GameOver
  • game - addEventListener

Links

URls for the project repo and deploy:

Slides

surviving-earth's People

Contributors

l-goede avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.