TronTail is a 2D Snake game created by my group and I. It is a fast-paced, retro snake game where players control a growing snake that must navigate through a grid, collect food items, and avoid colliding with itself.
Follow these instructions to help you set up the script on you computer for testing or further development.
- Visual Studio (not visual studio code)
- SFML library 2.6.x
- Start of by ensuring you have the library SFML installed. (https://www.sfml-dev.org/download/sfml/2.6.2/)
- Install Visual Studio if you havent already and create an empty C++ project
- To set up the SFML Environment follow this video (https://www.youtube.com/watch?v=4fcTqmT0Hhg&t=38s)
- Download the font here and install it (https://www.dafont.com/snake-game.font)
- Images for the Background and snake game should be in their respective folders already. If not download and them and make sure.
- Run the code. Use the arrow keys to select an option at the main menu and enter to select. Use the arrow keys to move the snake character as well
Everything works well despite a few bugs. I cant figure out with the backgrounds how to keep the resolution in good quality. I believe it has something to do with the small window the game starts in. I tried to implement a piece of code to make it fullscreen on start up but couldnt get it to work.
- C++ 23
- SFML (Simple And Fast Multimedia Library)
Contributions are Welcome! If you find any issues or have suggestions for improvments, I'm all ears. Feel free to open an issue or submit a pull request.
There are a few more things I'd like to implement into this code in the future.
-I want to implement a Game Over page after you run into yourself. It would print the number of apples you'd eaten before you ran into something and also have a retry button to start over.
-Better looking gui with more in the about section -Highscore feature
-campaign with different levels each with a different amount of obstacles in the grid
This project is licensed under the MIT License - see the the LICENSE file for details
- Props to the developers of the SFML
- Inspiration from this video: 16 Games in SFML (https://www.youtube.com/watch?v=bwsyFVqWoz8&t=2s)
- inspiration for Main Menu from this video (https://www.youtube.com/watch?v=bOG8667yePY)