/ML5-based-snake-game

a web based snake game using machine learning

Primary LanguageJavaScript

ML5-based-snake-game

a web based snake game using machine learning

trying to learn a javascript library called ml5.js by creating a basic web based snake game. The snake is not controlled by the arrow keys but instead, it is controlled by hand gestures by the help of machine learning.

NOTE:

Node should be installed.

Usage

  1. Clone or download the ZIP file.
  2. Unzip the file.
  3. open the terminal and navigate to the path where you unzipped the downloaded file.
  4. Run this command: npm install -g http-server, if local server is not installed. This will allow us to run the js files on localhost.
  5. Run this command: browser-sync start --server -f -w which has the benefit of reloading the browser automatically after saving the file. After running the command, go to the localhost address provided in the terminal.(example: http://localhost:3000).