Hongyu-Li / Snake_Game

🐍play snake game using head gestures

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Snake Game

Are you working in a sitting position right now? Feeling pains about your stiff neck and tight shoulders? If so, you're gonna love our game! Now go to https://snake.tensor-game.tk/ and have a relax!

How to play?

In this game, you have to use your head gestures to guide the snake to gain score as high as possible like this:
👇👇👇👇(A big THANK YOU to our demo tester @codingwesley)
demo

Got interested? Four steps to start playing quickly:

  • Step 1: Put your nose on the '+' of camera.
  • Step 2: Show your hand in front of camera to start/restart the game.
  • Step 3: Turn your head up, down, left and right to control your snake.
  • Step 4: Enjoy the game!

[BOUNUS] Notice Change Game button at the bottom of the instruction page? Click it and try to use your head to play Tetris.

Development Environment

This demo was inspired by tensorflowjs Pac-Man demo.

  • Model: We used the idea of transfer learning to train the model with Tensorflow 2.0 on Colab. The training process and the architecture of the model could be found in /src/(Smaller)Snake-Game-Alpha.ipynb. Our final training accuracy is 99.34% and validation accuracy is 98.14%.
  • UI: Typescript + React + Mobx.

TODO

  • Deploy online

  • Recognize hand gesture to start/restart the game

  • SSL Certificate (open camera without configuring chrome)

  • Prettier UI

Core Members

Acknowledge

Code borrows heavily from Pac-Man.

About

🐍play snake game using head gestures


Languages

Language:Jupyter Notebook 69.1%Language:TypeScript 27.0%Language:CSS 1.9%Language:HTML 1.6%Language:JavaScript 0.4%