https://github.com/dheovani/snakegame
Recreated my SnakeGame in C++ with SFML Graphics library
https://github.com/dheovani/snakegame
cplusplus cpp game game-development gamedev sfml sfml-cpp sfml-game sfml-game-development sfml-graphics-library snake snake-game snakegame
Last synced: about 2 months ago
JSON representation
Recreated my SnakeGame in C++ with SFML Graphics library
- Host: GitHub
- URL: https://github.com/dheovani/snakegame
- Owner: Dheovani
- License: mit
- Created: 2024-03-14T14:31:16.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-03-15T12:02:43.000Z (about 1 year ago)
- Last Synced: 2025-01-20T07:31:57.625Z (3 months ago)
- Topics: cplusplus, cpp, game, game-development, gamedev, sfml, sfml-cpp, sfml-game, sfml-game-development, sfml-graphics-library, snake, snake-game, snakegame
- Language: C++
- Homepage:
- Size: 54.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# SnakeGame
[Gameplay](https://github.com/Dheovani/SnakeGame/assets/79609196/dbbe117f-a8fb-4a6a-ab3d-7d1fde38cffb)
This is a classic Snake game implemented in C++. It's a simple yet entertaining game where the player controls a snake that grows longer as it consumes food.
## How to Play
1. Clone or download the repository.
2. Compile the code using a C++ compiler, e.g., `gcc main.cpp -o snake_game`.
3. Run the game with `./snake_game` (on Unix-based systems) or `snake_game.exe` (on Windows).## Controls
- Use the arrow keys to control the direction of the snake:
- Up: `↑`
- Down: `↓`
- Left: `←`
- Right: `→`
- Enter: 🔄## Gameplay
- The snake starts with a length of one.
- Move the snake to collect food (green circles).
- The snake grows in size when it eats food.
- Try to achieve the highest score by eating as much food as possible without colliding with yourself.## License
This Snake Game in C++ is open-source and available under the [MIT License](LICENSE). You are free to use and modify the code for your purposes.
Happy gaming! 🐍