A snake game built with Vanilla JS, HTML and CSS.
A quick note...
The code is as-it-is: no linter, no tests and, in many places, the inconsistencies of experimenting with several design patterns and strategies to write a video game. The "game-objects" folder is my 1st attempt, the "component-based-entity-system" folder is my 2nd attempt. Also, the code runs at 120fps on my M1 Mac. You might have to modify the initial snake speed if the frame rate is slower on your machine.
npm i && npm start
Music composed around 2004 by firestorm aka "tempête de feu", all rights reserved.
...
- Game Programming Patterns - Component, by Bob Nystrom
- Evolve Your Hierarchy, by Mick West
- Entity Component System FAQ, by Sander Mertens
- Game Programming Patterns, by Bob Nystrom
- MDN Canvas API
- MDN Web Audio API
- Stately - What are state machines and statecharts?
- pixabay - royalty free sound effects for download
- TwistedWave - An audio editor in a browser!
- icons8 - free icons and more
- SheCodes coding tools - 1,671 CSS Color Palettes
- Pexels - Free Night Sky Photos