Skip to content

flplima/snake-machine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake Machine

This is a browser-based remake of the classic Nokia's Snake II, the best snake game ever, written in TypeScript and using state machines to manage the game logic.

I wrote this game to study and practice XState and state machines in my spare time.

Play it online

https://snake-machine.vercel.app/

Getting started

First of all, make sure you have NodeJS and Yarn installed.

(you can use npm instead of yarn if you prefer)

# Clone this repository
git clone https://github.com/flplima/snake-machine

# Navigate into the directory
cd snake-machine

# Install dependencies
yarn

# Start the development server on port 3000
yarn dev

Technologies

  • XState for state management and game logic
  • Canvas API to render the game
  • Vite to create the development server and build
  • Vercel to deploy

TODO

This game is under development and any contribution is welcome!

  • Add mazes
  • Add speed config
  • Add screen buttons to play the game on mobile devices
  • Refactor
  • Improve typing definition
  • Write a documentation

Author

I'm Felipe Lima and you can contact me through my LinkedIn.