A simple Flappy Bird game built using Java and Swing. This project demonstrates basic game development concepts, including rendering graphics, handling user input, and managing game logic.
- Customizable Game Board: The game window is set to a width of 360px and a height of 640px.
- Swing Framework: Utilizes Java Swing for creating the game window and rendering graphics.
- Game Logic: Includes a
FlappyBirdclass (not shown here) to handle the core game mechanics.
Watch the step-by-step guide on how to set up and play the game:
- Clone the repository:
git clone https://github.com/Ayushdu37/Flappy-Bird.git
cd Flappy-Bird
- Compile the Java files:
javac -d bin src/*.java
- Run the application:
java -cp bin App
The main entry point of the application is the App class:
public class App {
public static void main(String[] args) {
int boardWidth = 360;
int boardHeight = 640;
JFrame frame = new JFrame("Flappy Bird");
frame.setVisible(true);
frame.setSize(boardWidth, boardHeight);
frame.setLocationRelativeTo(null);
frame.setResizable(false);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
FlappyBird flappyBird = new FlappyBird();
frame.add(flappyBird);
frame.pack();
flappyBird.requestFocus();
frame.setVisible(true);
}
}
- Java Development Kit (JDK) 8 or higher
- A Java IDE (e.g., IntelliJ IDEA, Eclipse, or Visual Studio Code) or a terminal for compilation and execution
Feel free to fork this repository and submit pull requests for improvements or new features.
This project is licensed under the MIT License. See the LICENSE file for details.
Developed by Ayushdu37.