AngryBirbs is an open-source clone of the popular game Angry Birds. The game is developed primarily using Java and LibGDX.
Mohammad Umar 2023324
Praveer Singh Chauhan 2023397
- Download and Open in IntelliJ IDEA.
- Project from Existing Sources -> build.gradle file
- Click on the Gradle tools in the right panel.
-
To clean:
AngryBirbs->Tasks->build->clean
-
To build:
AngryBirbs->Running Configurations->AP Project[build]
-
To run:
AngryBirbs->Running Configurations->AP ProjectrRun]
-
To run tests:
AngryBirbs->Running Configurations->AP Project[test]
-
To clean:
sh gradlew clean
-
To build:
sh gradlew build
-
To run:
sh gradlew run
-
To clean:
.\gradlew.bat clean -
To build:
.\gradlew.bat build -
To run:
.\gradlew.bat run
- Load/Save Game: The game can be saved and loaded at any point.
- Level Editor: The game has a level editor that allows users to create custom levels needs to use Tiled Map Editor
- Abilities: The game has different abilities for different birds.
- Red : Normal bird
- Blue : Splits into 3 birds
- Yellow : Speeds up
- Accurate Physics: The game uses Box2D for physics simulation.
Among others here are some of the OOPs concepts used in the project:
- Inheritance: The
Birdclass extends theGameObjectclass. - Polymorphism: The
Birdclass overrides theupdatemethod from theGameObjectclass. - Encapsulation: The
GameObjectclass has private fields and public getter and setter methods. - Abstraction: The
GameObjectclass is an abstract class. - Interfaces: The
Collidableinterface is implemented by theGameObjectclass. - Composition: The
Gameclass has a list ofGameObjectobjects. - Aggregation: The
Gameclass has aLevelobject. - Association: The
Gameclass has aLevelobject. - Dependency: The
Gameclass depends on theLevelclass.
Among others here are some of the design patterns used in the project:
-
Singleton Pattern: Ensures that only one instance of a class is created and provides a global point of access to it.
- Class:
Game
- Class:
-
Composite Pattern: Composes objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.
- Class:
Level
- Class:
-
Command Pattern: Encapsulates a request as an object, thereby allowing for parameterization of clients with queues, requests, and operations.
- Class:
Slingshot,SlingshotInput
- Class:
-
Template Method Pattern: Defines the skeleton of an algorithm in a method, deferring some steps to subclasses.
- Class:
Bird,Pig,Material
- Class:
-
Mediator Pattern: Defines an object that encapsulates how a set of objects interact.
- Class:
Menu
- Class:
-
Chain of Responsibility Pattern: Passes a request along a chain of handlers.
- Class:
GameContactListener
- Class:
The project uses JUnit for testing. The tests are located in the core/test directory.
- Initialization: Tests the initialization of the
Birdclass. - Toggle Physics: Tests toggling the physics of the bird.
- Set Dead: Tests setting the bird to dead.
- Set Position: Tests setting the position of the bird.
- Get Velocity: Tests getting the velocity of the bird.
- Dispose: Tests disposing of the bird.
- Initialization: Tests the initialization of the
Pigclass. - Toggle Physics: Tests toggling the physics of the pig.
- Set Dead: Tests setting the pig to dead.
- Set Position: Tests setting the position of the pig.
- Get Velocity: Tests getting the velocity of the pig.
- Dispose: Tests disposing of the pig.
- Take Damage: Tests taking damage by the pig.
- Initialization: Tests the initialization of the
Materialclass. - Set Position: Tests setting the position of the material.
- Get Velocity: Tests getting the velocity of the material.
- Dispose: Tests disposing of the material.
- Take Damage: Tests taking damage by the material.
- Open Tiled Map Editor.
- Open the
core/assets/levelsdirectory. - Open the
level1.tmxfile. - Create the level using the tileset.
- Save as 'LevelName.tmx' in the
core/assets/levelsdirectory. - Run the game and select the level.
- https://github.com/Celerium-Ce/AngryBirbs/tree/mergingbranch ( mergingbranch branch has)
To pause press esc, to see game end screen shoot the birds and destroy the blocks and pig
