Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/charakamihiranga/snake-game
This Game is a classic arcade game where the player controls a snake that moves around the screen, eating food pellets to grow longer. The game continues until the snake collides with itself or the boundaries of the play area. It's a simple yet addictive game that tests the player's reflexes and strategy.
https://github.com/charakamihiranga/snake-game
java java-swing javafx snake-game
Last synced: 2 months ago
JSON representation
This Game is a classic arcade game where the player controls a snake that moves around the screen, eating food pellets to grow longer. The game continues until the snake collides with itself or the boundaries of the play area. It's a simple yet addictive game that tests the player's reflexes and strategy.
- Host: GitHub
- URL: https://github.com/charakamihiranga/snake-game
- Owner: CharakaMihiranga
- License: mit
- Created: 2024-02-03T08:01:09.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2024-08-09T17:59:02.000Z (6 months ago)
- Last Synced: 2024-08-09T19:30:09.150Z (6 months ago)
- Topics: java, java-swing, javafx, snake-game
- Language: Java
- Homepage:
- Size: 79.6 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Snake Game
## Description
Snake Game is a classic arcade game where the player controls a snake that moves around the screen, eating food pellets to grow longer. The game continues until the snake collides with itself or the boundaries of the play area. It's a simple yet addictive game that tests the player's reflexes and strategy.![Screenshot](src/main/resources/Screenshots/Screenshot%202024-02-21%20132413.png)
![Screenshot](src/main/resources/Screenshots/Screenshot%202024-02-21%20132441.png)
![Screenshot](src/main/resources/Screenshots/Screenshot%202024-02-21%20132518.png)
## Features
- Classic snake gameplay with intuitive controls.
- Increasing difficulty as the snake grows longer.
- Score tracking to keep track of the player's progress.
- Sound effects for enhanced gameplay experience.
- Leaderboard to display top scores.## Technologies Used
- JavaFX for the user interface.
- Java programming language for game logic.
- Git for version control.
- IDE: IntelliJ IDEA## Getting Started
### Prerequisites
- Java Development Kit (JDK) installed on your system.
- Git installed on your system (optional).
- MySQL installed on your system.### Installation
1. Clone the repository:
git clone https://github.com/CharakaMihiranga/snake-game.git2. Open the project in your preferred IDE.
3. Build and run the project.### Setting Up the Database
1. Navigate to the `src/main/resources/sql` directory in your project.
2. Execute the SnakeGame.sql script to create the database schema:
mysql -u username -p < SnakeGame.sqlReplace `username` with your MySQL username. You will be prompted to enter your MySQL password. Alternatively, you can use a MySQL client to execute the script.
## Usage
- Use arrow keys or WASD keys to control the direction of the snake.
- Eat food pellets to grow longer.
- Avoid colliding with the snake's body or the edges of the play area.## Acknowledgements
This project was inspired by the classic Snake game.