Git Product home page Git Product logo

wholesome-square's Introduction

A Wholesome Square

Description

Square wants a healthy, prosper and long life. So he went to Dr.Rectangle, who told him to only eat little black squares from now on... Help Square eat as many little squares and avoid any type of color, diversity or fun whatsoever.

MVP (DOM - CANVAS)

This game has four states:

Start: Initial game screen, showing a simple splash and start button.

Game: It will allow the player to move left or right between the canvas width.

Game Over: The game will end if the player touches or eats 3 colored shapes. This screen would have a button that restarts the game when clicked.

The game is about touching or eating the little black squares with the big player square while avoiding the colored evil squares, basically.

Backlog

  • Levels
  • Music
  • Intro & Storyline
  • Animations
  • Items (Invincibility & Others)
  • Different difficulties

Data structure

  • main.js: only methods-> createSplash(), createGame(), createGameOver(), buildDOM()
  • Player.js: this.x, this.y(fixed), this.width, this.height, this.color, this.direction, this.speed. this.draw(), this.move(), this.checkBorders(), this.updateLives()
  • Enemy.js: this.x, this.y, this.width, this.height, this.color, this.direction, this.speed. this.draw(), this.move(), this.eliminateEnemy()
  • Powerup.js: this.x, this.y, this.height, this.color, this.direction, this.speed, this.draw(), this.move(), this.eliminatePowerup()

States y States Transitions

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

  • splashScreen
  • gameScreen
  • gameoverScreen
  • winScreen

Task

Task definition in order of priority

  • create files (index.html, style.css, main.js, Game.js, Player.js, Enemy.js.
  • wireframe and game states (start->game->win/gameover->start)
  • create canvas
  • create loop
  • display Player on canvas
  • code movement of player, limited to widht of the canvas
  • generate an enemy
  • generate Item
  • generate multiple and random enemies
  • make enemies randomized colors
  • code collisions between Player and Enemy
  • substract life from player if collision happens
  • code collisions between Player and Item
  • do something about the item(initally food, add +1 life)

Links

Trello

Link url

Git

URls for the project repo and deploy Link Repo Link Deploy

Slides

URls for the project presentation (slides) Link Slides.com

wholesome-square's People

Contributors

vairojarela 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.