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.
https://snake-machine.vercel.app/
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
- XState for state management and game logic
- Canvas API to render the game
- Vite to create the development server and build
- Vercel to deploy
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
I'm Felipe Lima and you can contact me through my LinkedIn.