This Single Page Application is my JavaScript project for Flatiron School. It is a browser based game, build using Javascript, HTML (canvas), and CSS in the frontend, and Rails as an API for the backend. This app took inspiration from Easy Money Snake and Flappy Bird. It is a basketball themed game where player controls James Harden left and right, and collides with other objects falling down from the top of the game canvas. If you collide with a player playing defence, you get +100 points, if you collide with a player taking a charge, you lose a life, if you collide with the referee, you get +500 points and get an extra life. Since referees provide the most help to Harden (you), their spawns are rare. Disclaimer: This app is not a diss at James Harden.
Javascript, CSS, and HTML Canvas for the frontend. Rails as an API as the backend.
- Has a High Scores list, with the most recent score showing up top, has a top 5 scores all time, and a top 5 score for today list as well.
- Clone directory from my github
- cd into
backend-api - run
bundle install - run
rails db:migrateand `rails db:seed' - run
rails sto start the server. - open a new terminal, cd into
gameFrontend, and openindex.html.
- Read the instructions and choose your character.
- Use
arrow leftandarrow rightoraanddto move left or right. Presssto pause game. - Collide with defenders with hands up to flop for points.
- Collide with defenders taking a charge to lose a foul.
- Collide with referees to get bonus points and recover a life.
- Game ends when you foul out.
Inspiration came from a game that took a fun spin on a classic "snake" game Easy Money Snake. Flappy Bird also inspired me as well.
The png of Harden's head came from Bleacher Report's Game of Zones.
Game music by Patrick de Arteaga.