Welcome to the Golang Snake Game repository! This is a simple implementation of the classic Snake game written in go programming language and the Ebiten open-source game engine.. Have fun playing and exploring the code!
- Control a snake to eat food and grow in size
- Snake wraps around the game board when reaching the edges
- Gradually increasing the snake's speed
- Use the arrow keys to move the snake: ↑ (up), ↓ (down), ← (left), → (right)
- Use Space key to play again when the game is over.
You can play the game in two ways:
- Play in the Browser: Visit this link to play the game directly in your browser.
- Play on your Machine: Install Golang on your machine, clone this repository, and build the game following the instructions mentioned in the Installation section below.
To play the Snake game, you need to have Golang installed on your system. If you haven't installed it yet, you can download it from Golang's official website.
Clone this repository using the following command:
git clone https://github.com/abanoub-fathy/snake-game.git
Change directory to the cloned repository:
cd snake-game
Install dependencies
go get
Build the game:
go build .
Once you've built the game, you can start playing by running the executable:
./snakeGame
This is a basic Snake game implementation, and there's room for exciting additions:
- Sound Effects: Enhance the gameplay experience by incorporating sound effects for actions like eating food, hitting snake body, and game over.
- Levels: Introduce difficulty levels by changing the size of the play area, or introducing obstacles. This can add a layer of challenge and keep players engaged.
- Pausing the Game: Implement a pause functionality using keyboard input or a dedicated button to allow players to temporarily stop the game and resume later. This can be useful for taking breaks or strategizing their next move.
These are just a few ideas to get you started. Feel free to explore other creative enhancements to make this Snake game even more enjoyable!
We welcome contributions to this project! Please submit pull requests with clear descriptions of your changes. Ensure proper code formatting and testing before submitting.
This project is licensed under the MIT License. See the LICENSE file for details.