Skip to content

Ayushdu37/Flappy-Bird

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flappy Bird

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.

Features

  • 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 FlappyBird class (not shown here) to handle the core game mechanics.

🎥 Tutorial Video

Watch the step-by-step guide on how to set up and play the game:

Watch the Tutorial

How to Run

  1. Clone the repository:
git clone https://github.com/Ayushdu37/Flappy-Bird.git
cd Flappy-Bird
  1. Compile the Java files:
javac -d bin src/*.java
  1. Run the application:
java -cp bin App

Code Overview

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);
    }
}

Prerequisites

  • 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

Contributing

Feel free to fork this repository and submit pull requests for improvements or new features.


License

This project is licensed under the MIT License. See the LICENSE file for details.


Author

Developed by Ayushdu37.

About

A simple recreation of the classic Flappy Bird game built using Java and Swing for the GUI. The game features smooth graphics rendering, keyboard controls, collision detection, and a scoring system. This project was developed as a fun way to practice Java GUI programming, event handling, and basic game physics.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages