/snake-react-game

A Snake game made in JavaScript, with Canvas and React

Primary LanguageJavaScript

🐍 Snake React game 🐍

===

Technologies used:

  • JavaScript
  • ES6 syntax
  • Canvas
  • create-react-app
  • React
  • React-Dom
  • Styled-components
  • Is-touch-device
  • Github pages

Github Pages Link:

Guillaume's Snake React Game

How to run locally:

  • General Use:
git clone git@github.com:GBouffard/snake-react-game.git
cd snake-react-game

npm install
npm start

Methodology:

  • I wanted to learn and experiment with canvas and games so found examples of snake games and tutorials (JS/HTML/JQuery) which I studied in order to make my own version mostly based on React and JavaScript.
  • The app was scaffolded through react-create-app.
  • I then build in a scalable way the game. In order I added an empyty Canvas, a target, a snake, and motions as well as handling different cases that make the game what it is.
  • This game being available on mobile phones from the late 90s/early 2000s I wanted to create a cool retro UI which I then worked on.
  • I added responsive design and animations.
  • I added a tooltip component to explain how to play the game on different devices.
  • I deployed using Github pages.
  • I then added a little score tracker because in the end, it's nice to know how well we do in this game.

What I learnt:

  • Canvas and how to make a game on canvas
  • Is-touch-device