Giter VIP home page Giter VIP logo

iron-flip-run's Introduction

Iron flip run

The purpose of the game is to avoid obstacles and reach the highest possible score.

The game screen is a line with moving square obstacles.

The player is represented by a block that flips side of the game line every time a click event is detected. The player can use any key to switch side.

The game is over when a collition is detected between the player and an obstacle.

Extra: As the game goes on, the screen changes colors and sometimes the whole canvas starts to rotate.


MVP

Technique

Html5 Canvas and Vanilla Javascript

Game states

  • Start Screen

    • Title
    • Play button
  • Game Screen

    • Canvas
  • Game Over Screen

    • Play again button
    • Go to start screen button

Game

  • Create line
  • Create player on line
  • Move player
    • Click on any button to move player over or under the line.
  • Create obstacles over and under the line
  • Check collision
  • If collision -> Game Over -> Show Game Over Screen

BACK LOG

Rotate canvas

Score

  • Run counter and store score on game over

High score

  • Create High Score Screen
  • Show latest score on Start Screen
  • Add high score button to Start Screen

Music

  • Add background music to game
  • Add music on and off button to Start screen.

Player colors

  • Create Color Screen
    • Let user choose color of player with color buttons
  • Add Choose color button to Start Screen
  • Change color of player when playing

Levels

  • Check score and increase level.

Data structure

main.js

createStartScreen(id);
createGameScreen(id);
createGameOverScreen(id);

destroyStartScreen();
destroyGameScreen();
destroyGameOverScreen();

var game = new Game({
    this.rows,
    this.columns,
    ctx: ctx,
    backgroundcolor = ['xxx','xxx','xxx'],
    this.obstacles,
    this.player
  });

game.init();

Game.js

function Game(options){};
Game.drawBoard();
Game.drawPlayer();
Game.generateObstacles();
Game.gameOver();
Game.init();

garbageCollector;

Player.js

function Player(){
  this.width;
  this.height;
  this.color;
};
Player.move();

Obstacle.js

function Obstacle(){
  this.width;
  this.height;
};
moveForward();

Links

Iron flip run Trello

Github

iron-flip-run's People

Contributors

annaclf avatar

Watchers

James Cloos 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.