An open API service indexing awesome lists of open source software.

https://github.com/sud3801/snake_game

Snake Game using Java ๐Ÿ
https://github.com/sud3801/snake_game

awt game java swing

Last synced: 9 months ago
JSON representation

Snake Game using Java ๐Ÿ

Awesome Lists containing this project

README

          

# Snake Game ๐ŸŽฎ

A modernized version of the classic Snake game implemented in Java, featuring smooth graphics, arcade-style effects, and intuitive gameplay. ๐Ÿ

## Features โœจ
- **Smooth Gameplay**: Enjoy fluid animations with antialiasing and gradient effects.
- **Arcade-Style Design**: Includes retro fonts, glowing text effects, and vibrant colors.
- **Dynamic Grid**: A visually appealing grid layout for better gameplay experience.
- **Wrap-Around Mechanics**: The snake can pass through walls and appear on the opposite side.
- **Interactive UI**: Displays the score in real-time and shows game-over messages with restart instructions.

## Gameplay Instructions ๐ŸŽฎ
- Use the arrow keys to control the snake's direction:
- `โ†‘` Up
- `โ†“` Down
- `โ†` Left
- `โ†’` Right
- Collect apples to grow your snake and increase your score.
- Avoid colliding with your own body!
- Press `Space` to restart the game after a Game Over.

## How to Run ๐Ÿš€

1. Clone this repository:

```bash
git clone https://github.com/sud3801/snake_Game.git
```

2. Compile the program:

```bash
cd snake_Game
mkdir bin
javac -d bin src/com/snakeGame/*.java
```

3. Run the program

```bash
cd ..
java -cp bin com.snakeGame.Game
```

## Screenshots ๐Ÿ“ธ
### Game Start Screen:

### GamePlay:

### Game Over Screen:

## Project Structure ๐Ÿ“‚
```
snake_Game/
โ”œโ”€โ”€ bin/
โ”‚ โ””โ”€โ”€ com/
โ”‚ โ””โ”€โ”€snakeGame
โ”‚ โ””โ”€โ”€(all class files)
โ”œโ”€โ”€ src/
โ”‚ โ””โ”€โ”€ com/
โ”‚ โ””โ”€โ”€snakeGame/
| โ””โ”€โ”€Game.java #To start the game
| โ”œโ”€โ”€GameFrame.java #Represents game panel
| โ”œโ”€โ”€GamePanel.java # Main game logic
โ””โ”€โ”€ README.md # Project documentation
```

## Technologies Used ๐Ÿ› ๏ธ
- **Programming Language**: [Java](https://www.oracle.com/java/)
- **Graphics**: Java Swing and AWT for rendering

## Future Enhancements ๐Ÿš€
- Add difficulty levels (easy, medium, hard).
- Introduce new power-ups or obstacles.
- Implement multiplayer mode.
- Add sound effects and background music.

## Contributing ๐Ÿค
Contributions are welcome! Feel free to fork this repository and submit pull requests. For major changes, please open an issue first to discuss what you would like to change.

Enjoy playing Snake! ๐Ÿโœจ