Giter Site home page Giter Site logo

retroracecar's Introduction

RETRO RACE CAR

Descripción

Retro Race Car es un juego que consiste en conducir un coche horizontal y verticalmente por una autopista evitanto colisionar con el resto de coches que aparecen por la parte superior durante el máximo tiempo posible. El juego termina cuando pierdes todas las vidas o cuando se coge la mancha de aceite en el suelo.

Funcionalidades del juego

  • El juego tiene un coche que hay que mover horizontal y verticalmente.
  • El coche se mueve horizontalmente entre los cuatro carriles disponibles y verticalmente acelerando rápidamente o frenando lentamente.
  • El resto de coches aparecen de forma aleatoria por los cuatro carriles superiores y van bajando.
  • El juego empieza con dos vidas y se pueden llegar a conseguir un máximo de 4, cogiendo las llaves inglesas que aparecen de forma aleatoria por uno de los cuatro carriles, si se llega a cero vidas el juego termina.
  • También aparece una mancha de aceite de forma aleatoria que si se llega a tocar se acaba el juego de forma inmediata.
  • El Score sube en base al tiempo que logremos aguantar sin perder todas las vidas o colisionar con la mancha de aceite.
  • Cada 50 puntos sube la dificultad del juego haciendo cada vez más dificil evitar colisionar con el resto de los coches.
  • El juego guarda la puntuación máxima obtenida así como el estado del sonido para que la próxima vez que se juegue se mantenga esa información.

Funcionalidades futuras

  • Pasado cierto tiempo se hará de noche y los coches encenderán las luces.

Estructura del Proyecto

main.js

  • pause()
  • mute()
  • startGame()

game.js

  • Game () { this.isGameOn; this.bgArr; this.oilArr; this.wrenchArr; this.carDriver; this.carArr; this.crashImg;; this.liveUp;; this.levelUp; this.lives; this.frames; this.framesCarAppear; }
  • clearCanvas () {}
  • highwayMovement () {}
  • enemyCarsAppear () {}
  • oldCarsDisappear () {}
  • colissionCheck () {}
  • wrenchAppear () {}
  • wrenchColissionCheck () {}
  • oldWrenchDisappear () {}
  • stainOilAppear () {}
  • oilColissionCheck () {}
  • oldStainOilDisappear () {}
  • levelUpImgAppear () {}
  • gameOver () {}
  • scoreCounter () {}
  • gameLoop () {}

bg.js

  • constructor () { this.y; this.speed; this.bg; }
  • drawBg () {}
  • moveBg () {}

car1.js

  • constructor () { this.x; this.y; this.w; this.h; this.speed; this.move; this.image; this.pressedUp; this.pressedBottom; }
  • drawCar () {}
  • moveLeftCar () {}
  • moveRightCar () {}
  • moveUpCar () {}
  • brakeCar () {}

enemyCars.js

  • constructor () { this.x; this.y; this.w; this.h; this.speed; this.image; }
  • drawEnemyCar () {}
  • moveEnemyCar () {}

extraItems.js

  • constructor () { this.x; this.y; this.w; this.h; this.speed; this.image; }
  • drawExtraItem () {}
  • moveExtraItem () {}

showImg.js

  • constructor () { this.x; this.y; this.w; this.h; this.image; }
  • drawImg () {}

Pantallas del juego

  • Pantalla de incio.
  • Pantalla del juego.
  • pantalla de game-over.

Links extra

Git Hub Link

retroracecar's People

Contributors

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