Flappy Bird Game: Project Report
Flappy Bird Game: Project Report
Project Report
Industrial PROJECT (MCA364)
Degree
MASTER OF COMPUTER APPLICATION
Aug-Dec, 2024
I express my warm thanks to my internal guide, Mr. Vineet Saxena (Professor of CCSIT, TMU)
for hi constant support and guidance at all levels without whom this project would not have
been possible.
I would also like to extend my thanks to my external guide, to help me through this project.
Thank you,
Arpit Jain
Place:
Date:
DECLARATION
We hereby declare that this Project Report titled “Flappy Bird Game” submitted
by us and approved by our project guide, the College of Computing Sciences and
Information Technology (CCSIT), Teerthanker Mahaveer University, Moradabad, is
a bonafide work undertaken by us and it is not submitted to any other University
or Institution for the award of any degree diploma / certificate or published any
time before.
Table of Contents
1 PROJECT TITLE............................................................................................................................................ 7
2 PROJECT DESCRIPTION................................................................................................................................ 7
3 OBJECTIVE.................................................................................................................................................. 7
3.1 SCOPE OF THE WORK.......................................................................................................................................7
3.2 PROJECT MODULES..........................................................................................................................................7
3.3 CONTEXT DIAGRAM.........................................................................................................................................8
4 IMPLEMENTATION METHODOLOGY............................................................................................................ 8
5 TECHNOLOGIES TO BE USED........................................................................................................................ 8
5.1 SOFTWARE PLATFORM.....................................................................................................................................8
5.2 HARDWARE PLATFORM....................................................................................................................................8
6 SYSTEM DESIGN.......................................................................................................................................... 9
7 CLASS DESIGN............................................................................................................................................. 9
8 GAME PANEL.............................................................................................................................................. 9
9 GAME MECHANICS.................................................................................................................................... 10
10 ADVANTAGES OF THIS PROJECT................................................................................................................ 10
11 TESTING.................................................................................................................................................... 10
12 CHALLENGES AND SOLUTIONS.................................................................................................................. 10
13 FUTURE SCOPE AND FURTHER ENHANCEMENT OF THE PROJECT...............................................................11
14 PROJECT REPOSITORY LOCATION.............................................................................................................. 11
15 DEFINITIONS, ACRONYMS, AND ABBREVIATIONS......................................................................................11
16 CONCLUSION............................................................................................................................................ 12
17 REFERENCES.............................................................................................................................................. 12
Appendix
A: Data Flow Diagram (DFD)
B: Entity Relationship Diagram (ERD)
C: Use Case Diagram (UCD)
D: Data Dictionary (DD)
E: Screen Shots
1 Project Title
Flappy Bird Game
2 Project Description
Flappy Bird is a popular mobile game where the player controls a bird, attempting to fly
between pipes without touching them. The game gained immense popularity due to its simple
yet addictive mechanics. The primary goal of this project is to demonstrate fundamental
concepts of Java programming such as object-oriented design, GUI development, event
handling, and animation.
3 Objective
The objective of the Flappy Bird game developed in Java is to:
Recreate the classic Flappy Bird game using Java Swing for graphical user interface (GUI)
development.
Implement core game mechanics such as gravity, jumping, pipe movement, collision de-
tection, and score tracking.
Enhance programming skills in Java by designing and implementing game features step
by step.
4 Implementation Methodology
Requirement Analysis: Identify features and user needs.
Design: Create wireframes and choose suitable templates.
Development: Build the GUI using Java Swing, implement modules, and integrate func-
tionality.
5 Technologies to be used
Programming Language: Java
GUI Framework: Java Swing
Graphics: Buffered Image for rendering the game components
Game Loop: Timer-based game loop for continuous updating of game objects
Collision Detection: Detecting collisions between the bird and the pipes using simple
geometric checks.
6 System Design
The game is designed with several key components:
Bird:
The character controlled by the player. The bird is affected by gravity and can jump
when a key event occurs (e.g., pressing the spacebar).
Pipes:
Obstacles that the bird must navigate through. They continuously move from right to
left across the screen.
Background:
A repeating background that gives the illusion of motion.
Score:
Displays the current score based on how many pipes the bird has successfully passed.
7 Class Design
1. Main Class:
Initializes the game and starts the game loop.
2. Bird Class:
Represents the bird character, handles movement and collision.
3. Pipe Class:
Represents the pipes, manages their generation and movement.
4. Game Panel Class:
Handles rendering and game updates.
5. Score Class:
Tracks and displays the player's score.
8 Game Panel
This is the core of the game where all components (bird, pipes, background, etc.) are drawn and
updated. It handles:
9 Game Mechanics
Gravity:
The bird is affected by gravity, which makes it fall when the player is not pressing the
spacebar.
Jumping:
When the spacebar is pressed, the bird’s velocity is adjusted to make it jump upwards,
counteracting gravity.
Collision Detection:
The game checks if the bird collides with pipes or the ground. If a collision occurs, the
game ends.
Pipe Movement:
Pipes move from right to left at a constant speed. As the pipes exit the screen, new
pipes are generated, creating an endless loop.
Scoring:
The player earns points when the bird passes through the gap between pipes. The score
is incremented when the bird successfully navigates through.
11 Testing
Test case:
1. Bird Movement:
o Input: Key press
o Expected Outcome: Bird flaps upward.
2. Pipe Collision:
o Input: Bird collides with a pipe.
o Expected Outcome: Game over.
3. Score Increment:
o Input: Bird passes through pipes.
o Expected Outcome: Score increases by 1.
Abbreviation Description
PDF Portable Document Format
Integrated Development Environment
IDE
Graphical User Interface
GUI
Java Development Kit
JDK
16 Conclusion
This project successfully recreates the Flappy Bird game using Java. Through this project,
the importance of concepts like game loops, collision detection, and graphical rendering
in a game environment was clearly demonstrated. The project not only helped in
mastering Java programming techniques but also in understanding how to develop
interactive and real-time applications.
17 References
https://docs.oracle.com/javase/7/docs/api/javax/swing/package-summary.html
https://itextpdf.com/en/resources/api
https://poi.apache.org/
https://docs.oracle.com/javase/tutorial/
Annexure A
Data Flow Diagram (DFD)
(Mandatory)
Level 0 DFD
Level 1 DFD
Annexure B
Entity-Relationship Diagram (ERD)
(Mandatory)
Address Email
Name
User
Image
Contact
Creates
PDF Qualification
Resume
Skills
Annexure C
Use-Case Diagram (UCD)
Annexure D
Data Dictionary (DD)
(Mandatory)
Example:
User Table (USR)
Fields Data type Description
Name String Full name of the user
Contact String User's contact number
Email String User's email address
Address String Residential address of
the user
Image Binary User's profile picture
Skills String List of user's skills
Qualification String Academic qualifications
of the user
PDF Binary Generated PDF file of the
resume
Annexure E
Screen Shots
This Page shows that all the data is filled and resume is generated.