JavaScript Snake Progressive Web App (PWA)

Опубликовано: 16 Июль 2026
на канале: Love2Dev
502
8

The Blog Post - https://love2dev.com/blog/javascript-...
GitHub Repo - https://github.com/docluv/JavaScript-...
Play the Game - https://snake.love2dev.com

Progressive Web Apps From Beginner to Expert - http://PWACourse.com

The game is a JavaScript/HTML port of the popular Snake game on old Nokia phones. The object of the game is to guide a 'snake' to eat a dot. When the snake eats a dot it grows.

The more the snake grows the faster it gets and the more difficult it is to navigate.

The game is more addictive than you would think. Unfortunately the code does not work with touch at this point.

The source code is very simple, but the UI for this version is rather lacking. Since updating this code repository I found a few other repositories with slightly better user interfaces. I am hoping to get some time in the near future to update the UI and make it touch enabled.

To play the game you can use the four arrow keys on your keyboard to direct the snake. Just don't run out of room or hit the snake!


Get social with Love2Dev on:
Facebook:   / love2dev  
Twitter:   / chrislove  
G+: https://plus.google.com/b/11090410738...
Linkedin:   / love2dev  
Pinterest:   / docluv