Snake made with JavaScript

Portfolio und Leben

Snake made with JavaScript

This JavaScript Snake game is developed as a web game and uses HTML and CSS for the user interface and JavaScript for the game logic.

The Snake computer game is a simple game in which the player controls a snake that moves around the screen, consuming items (such as food or other bonuses) while avoiding obstacles (such as walls or its own tail). The snake’s length increases as it eats more items, making the game progressively more difficult. The goal of the game is to score as many points as possible before the snake crashes into an obstacle or its own tail. The game is available on various platforms such as mobile, PC, and gaming consoles.

Generated by ChatGPT

Features in my Implementation

Besides the usual moving around (using: „wasd“ or the arrow keys) and getting longer by eating bits, you can choose your difficulty at the start of every round. The higher the difficulty, the more the bits move around. In addition, you can choose the speed at which the snake moves around.

Furthermore, you can choose if the snake dies when it touches the border. You can additionally choose whether the snake leaves a trail wherever it moves.

After starting a game, you can pause and unpause by pressing „p“, „Esc“ or „Space“ on your keyboard.

Special Features

When playing, there are a few „cheat codes“ that you can trigger:

  • Pressing „i“ will trigger immortality and your snake cannot die
  • Pressing „x“ will summon 5 food bits
  • Pressing „l“: will turn every field of the game into a food bit

To ensure that your browser can run the game how it’s meant to be, I recommend using the Google Chrome Web Browser.

Look at my other projects!

If you found this article interesting, you might be interested in some of my other projects. Follow up on JavaScript applications, such as Minesweeper or the Monty Hall problem, or take a look at some of my python scripts like my wallpaper slicer or a video to ASCII conversion tool.

3 Antworten

  1. […] If you found this article interesting, you might be interested in some of my other projects. Follow up on python scripts, like my Video To ASCII, or take a look at some of my JavaScript applications like Snake or Minesweeper.  […]

  2. […] python scripts, like my wallpaper slicer, or take a look at some of my JavaScript applications like Snake or […]

  3. […] you might be interested in some of my other projects. Follow up on JavaScript applications, such as snake or the Monty Hall problem, or take a look at some of my python scripts like my wallpaper slicer or […]

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert