Git Product home page Git Product logo

hr-mvp's Introduction

README

This is a project I completed while a student at Hack Reactor. It is the snake-game. Enjoy!

image image

This project uses Node and Express to build the server, MongoDB and Mongoose to store users and highscores, and Angular on the front end along with canvas API to display the game.

The backend server conforms to RESTful api conventions.

Features

  • There is a selector at the top of the screen to change the speed of the snake.
  • The score is a counter of the snake's length. Eating each food will increase the snake's length by 3.
  • When a player gets a personal highscore, it is recorded and stored in the database.
  • Top 8 scores are displayed.

API End-Points

URL METHOD REQ BODY RES BODY
api/users GET JSON(user)
api/users POST {name: String} JSON(user)
api/users PUT {name: String, highScore: Number} JSON(user)
api/users DELETE {name: String} JSON(user)

Roadmap

  • The game currently does not increase in speed as the snake gets longer, or as time passes. It is possible to implement a feature that increases the snake speed as time passes or as the snake gets longer. This is a potential feature that can make the game feel more progressive.

  • Secondly, the scoring is linear, and increments by 3 each time the snake eats food. The scoring system can be more dynamic, and made a function of the time between eating, snake speed, and time. The basic building blocks are all present to make this possible.

  • Thirdly, since most of the game is controlled by the keyboard already, the game difficulty selector can be refactored be controlled by the keyboard as well.

hr-mvp's People

Contributors

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