Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/serkanyersen/snake

Basic Snake Game in TypeScript
https://github.com/serkanyersen/snake

demo education example fun game snake snake-game typescript

Last synced: 3 months ago
JSON representation

Basic Snake Game in TypeScript

Awesome Lists containing this project

README

        

## Basic Snake Game written in TypeScript
Just for fun. It's written in vanilla js, no libraries used. Also it uses HTML elements to render the game instead of canvas.

![Example](demo.gif)

[Demo](https://serkanyersen.github.io/snake/)

## Controls
- User arrow keys to move around
- `G` = Show Grid
- `C` = No Clip Mode, go through self and walls
- `J` = Slow down the snake
- `K` = Speed up the snake
- `SPACE` = Pause, Resume game
- `RETURN` = start the game
- `1 - 4` = Change levels
- `0` remove level

## Development
- Checkout the project and CD into it
- run `npm install` to get all dependencies
- run `npm run build` to build the app
- run `npm run dev` to get the game running on your browser