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

https://github.com/it21826740/flappy-bird

FlappyBird is a simple 2D arcade game built using Java and Swing. The game involves a bird that needs to navigate through a series of pipes without crashing into them. The goal is to score as many points as possible by passing through the gaps between the pipes.
https://github.com/it21826740/flappy-bird

2d-game flappy-bird flappy-bird-game java java-game mini-game physics

Last synced: 4 months ago
JSON representation

FlappyBird is a simple 2D arcade game built using Java and Swing. The game involves a bird that needs to navigate through a series of pipes without crashing into them. The goal is to score as many points as possible by passing through the gaps between the pipes.

Awesome Lists containing this project

README

          

# FlappyBird Java Game

FlappyBird is a simple 2D arcade game built using Java and Swing. The game involves a bird that needs to navigate through a series of pipes without crashing into them. The goal is to score as many points as possible by passing through the gaps between the pipes.

## Features

- **2D Graphics**: Includes custom images for the bird, pipes, and background.
- **Realistic Physics**: Gravity and velocity are applied to the bird for a more realistic gameplay experience.
- **Collision Detection**: Detects when the bird collides with a pipe or the ground, ending the game.
- **Scoring System**: Tracks the score based on how many pipes the bird successfully passes.

## Getting Started

### Prerequisites

- Java Development Kit (JDK) installed (version 8 or later).
- An Integrated Development Environment (IDE) like Eclipse or IntelliJ IDEA, or you can run it from the command line.

### Installation

1. Clone the repository:

```bash
git clone https://github.com/IT21826740/Flappy-Bird.git
cd Flappy-Bird
```

2. Compile the Java files:

```bash
javac FlappyBird.java
```

3. Run the game:

```bash
java FlappyBird
```

### Running the Game

- Use the `SPACEBAR` to make the bird fly upward.
- Avoid the pipes to keep playing and increase your score.
- The game ends when the bird hits a pipe or the ground.
- Press `SPACEBAR` after a game over to restart the game.

## Project Structure

- **FlappyBird.java**: The main file that contains the game logic, including the bird's movement, pipe placement, collision detection, and game rendering.
- **Images**: The images used for the bird, pipes, and background.

## Screenshots

![Screenshot 2024-08-13 114955](https://github.com/user-attachments/assets/5d661b03-a3e5-4807-9e31-ea62d9537b94)

## Contributing

Contributions are welcome! If you have ideas for improvements or new features, feel free to open an issue or submit a pull request.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Acknowledgments

- Inspired by the original Flappy Bird game.
- Thanks to (https://youtu.be/Xw2MEG-FBsE?si=TalZIdNfy_eXbulQ) for tutorials and resources.

---

Feel free to customize this template based on your needs and preferences!