This is a simple Snake game with a twist: every time the snake collides (game over), it displays an environmental fact to raise awareness about important ecological issues.
You can play the game online here: https://hridyanshkushwaha.github.io/ECOSnake/
ECOSnake is a classic Snake game reimagined with an educational purpose. The goal is to control the snake, eat food to grow longer, and avoid colliding with the walls or the snake's own body. When a collision occurs, instead of a standard "Game Over" screen, the player is presented with a fact about the environment, prompting reflection on our impact on the planet.
- Use the arrow keys (Up, Down, Left, Right) to control the snake's direction.
- Eat the food to grow longer.
- Avoid colliding with the walls or your own body.
- Classic Snake gameplay.
- Educational environmental facts displayed on game over.
- Simple and intuitive controls.
- HTML
- CSS
- JavaScript
This game was developed using HTML, CSS, and JavaScript. The game logic is implemented in game.js
, the structure is defined in index.html
, and the styling .
- Game concept inspired by the classic Snake game.
Copyright (c) 2025 Hridyansh Kushwaha
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.