/snake-game-react

Old School 2D Snake Game Clone written from scratch in React

Primary LanguageJavaScript

Old School 2D Snake Game Clone written in React

Play the game here: https://vadimgierko.github.io/snake-game-react/ CodeSandbox demo: https://codesandbox.io/s/snake-game-react-qreqki Source code on GitHub: https://github.com/vadimgierko/snake-game-react

Motivation

No tutorial was used in the game dev. The game was written from scratch entirely by me using React for entertainment and learning purposes.

I wanted to learn & manage how to develop & build:

  • game logic,
  • game loop binded to timer,
  • touch controler for touch screens.

As a side effect, I've refactored the code to adapt it for future use in case I want to build another game with game loop binded to timer, like... Tetris ;-)

Previously, I've built the game in JavaScript using p5.js library a year ago, but this time I wanted to do it in React without external libraries for animations.

Stack

  • React
  • React Icons
  • CSS