By Pranshu (2023385) & Animish Yadav (2023089)
This project is a clone of the classic Angry Birds game, built using the LibGDX framework as part of the CSE201 (Advanced Programming) course. The game demonstrates object-oriented programming (OOP) principles, design patterns, and serialization concepts.
Angry Birds Game - AP Edition challenges players to use a slingshot to defeat pigs hidden within structures. The game incorporates physics-based gameplay, OOP principles, and clean design practices. It also supports saving and restoring progress through serialization.
- Slingshot mechanics: drag to aim and launch birds.
- Birds with different speeds and impacts.
- Pigs with varying durability and size.
- Structures with blocks made of wood, glass, and steel.
- Three unique levels, each with varying difficulties and setups.
- Save and restore game progress, including:
- Remaining birds.
- Hits dealt to pigs and structures.
- Collapsed structures.
- Multiple user profiles.
- Sound effects and background music.
Ensure the following are installed:
- Java Development Kit (JDK) 8 or higher.
- Gradle (optional, if you don't use the Gradle wrapper).
- Clone this repository:
git clone https://github.com/Pranshu-iiitd/Angry_Birds.git cd Angry_Birds
- Build the project using Gradle:
./gradlew build
- Run the game:
./gradlew run
- Drag: Aim the slingshot.
- Release: Launch the bird.
- Menu Options:
- Save: Save current game state.
- Load: Restore a saved game state.
- Launch birds at structures to destroy pigs.
- Win by defeating all pigs within the available birds.
- Lose if all birds are used without defeating all pigs.
- Each bird, pig, and block type has unique properties:
- Birds vary in speed and damage.
- Pigs and blocks vary in durability.
- OOP Principles:
- Inheritance: Birds and pigs are derived from base classes.
- Polymorphism: Special abilities for different birds.
- Interfaces: Game mechanics and event handling.
- Design Patterns:
- Composite: Used in materials and it's derived classes.
- State: Used in switching between different menus and screens.
- Strategy: Used in bird movement and collision detection.
- Observer: Used in event handling and notifications.
- Serialization:
- Saves and restores gameplay progress.
JUnit tests are implemented to ensure game components work as expected:
- Physics calculations.
- Serialization and deserialization.
- Level completion checks.
- A total of 23 tests are implemented.
- Game framework: LibGDX
- Original concept: Angry Birds
- Course: CSE201 - Advanced Programming
- Developers:
- Pranshu (2023385)
- Animish Yadav (2023089)