Snake Game is a classic game developed as part of Task 4 for my Future Intern internship. This project implements the classic Snake Game using HTML, CSS, JavaScript, and Spring Boot. The game is designed to be engaging and easy to play directly from a web browser.
-
Frontend:
- HTML
- CSS (Custom Styling)
- JavaScript
-
Backend:
- Java
- Spring Boot
-
Others:
- Maven (for project management)
- Classic Gameplay: Implementing the traditional Snake game mechanics with smooth and responsive controls.
- Score Tracking: Real-time score display and updates as the game progresses.
- Game Over Handling: Shows a popup with the final score and the option to restart the game.
- Responsive Design: Ensures the game interface is functional and visually appealing on various device sizes.
- Sound Effects: Audio cues for eating food and game over events.
-
Play the Game
- Access the game by navigating to
http://localhost:8080/
in your web browser. - Use the arrow keys to control the direction of the snake.
- Access the game by navigating to
-
Restart the Game
- When the game is over, a popup will appear with the final score and a "Restart" button. Click "Restart" to play the game again.
-
Score Display
- The score is updated live on the game screen as the snake eats food.
The Snake Game does not utilize traditional API endpoints but is served as a static HTML file with associated assets. The game logic and assets are all handled client-side with JavaScript and server-side with Spring Boot for serving the static content.
-
1. Clone the Repository
git clone https://github.com/hey-its-d2t2/Snake-Game.git cd Snake-Game
-
2. Set Up the Backend
Navigate to the backend directory and build the Spring Boot application.
cd backend ./mvnw spring-boot:run
-
3. Access the Game
Open the following URL in your browser to play the game.
http://localhost:8080/
To contribute to this project or make modifications, please follow these guidelines:
- Ensure code adheres to project standards.
- Include appropriate tests for new features.
- submit pull requests with detailed descriptions of changes.
- Spring Boot: For providing a robust framework to serve static content.
- HTML/CSS/JavaScript: For implementing the game’s interface and functionality.
For any questions or feedback, please contact me at deepsinghkumar01@gmail.com.