|
1 | | -# template |
2 | | -A Template Repository for OpenSpringFest (OSF) |
| 1 | +# Flappy Bird Game |
| 2 | + |
| 3 | +Welcome to the Flappy Bird Game project! This project is designed to help beginners learn Flutter by contributing to an open-source game. The game is a simple clone of the classic Flappy Bird, where the player controls a bird to navigate through barriers without hitting them. |
| 4 | + |
| 5 | +## Demo |
| 6 | +[Watch Demo Video](./flappy_bird.mp4) |
| 7 | + |
| 8 | +## Project Overview |
| 9 | +This project is built using Flutter, a popular framework for building cross-platform applications. The game logic, UI, and animations are implemented in Dart. Participants will complete the game by implementing missing functions and logic. |
| 10 | + |
| 11 | +## Tasks for Participants |
| 12 | +Below are the tasks that need to be completed to make the game functional: |
| 13 | + |
| 14 | +1. **Implement the Game Loop** |
| 15 | + - File: `lib/homepage.dart` |
| 16 | + - Function: `startGame` |
| 17 | + - **Hint:** Use a `Timer` to periodically update the bird's position and barriers. Apply physics equations to simulate gravity and jumping. |
| 18 | + |
| 19 | +2. **Reset the Game** |
| 20 | + - File: `lib/homepage.dart` |
| 21 | + - Function: `resetGame` |
| 22 | + - **Hint:** Reset all game variables to their initial values. |
| 23 | + |
| 24 | +3. **Show Game Over Dialog** |
| 25 | + - File: `lib/homepage.dart` |
| 26 | + - Function: `_showDialog` |
| 27 | + - **Hint:** Use the `showDialog` function to display a dialog when the game ends. Include a restart option. |
| 28 | + |
| 29 | +4. **Implement Jump Logic** |
| 30 | + - File: `lib/homepage.dart` |
| 31 | + - Function: `jump` |
| 32 | + - **Hint:** Reset the time and update the bird's initial position to simulate a jump. |
| 33 | + |
| 34 | +5. **Check if the Bird is Dead** |
| 35 | + - File: `lib/homepage.dart` |
| 36 | + - Function: `birdisDead` |
| 37 | + - **Hint:** Return `true` if the bird goes out of bounds. |
| 38 | + |
| 39 | +## How to Contribute |
| 40 | +1. Fork this repository. |
| 41 | +2. Clone your forked repository to your local machine. |
| 42 | +3. Open the project in your favorite IDE (e.g., VS Code, Android Studio). |
| 43 | +4. Navigate to the `lib/homepage.dart` file and complete the missing functions. |
| 44 | +5. Test your changes by running the app on an emulator or physical device. |
| 45 | +6. Commit your changes and push them to your forked repository. |
| 46 | +7. Create a pull request to the main repository. |
| 47 | + |
| 48 | +### Pull Request Guidelines |
| 49 | +- For each task or feature, please raise a **separate pull request (PR)**. |
| 50 | +- Ensure that your PR includes a clear description of the changes you made. |
| 51 | +- Reference the issue number (if applicable) in your PR description. |
| 52 | +- Test your changes thoroughly before submitting the PR. |
| 53 | + |
| 54 | +This helps maintain a clean and organized contribution process. Thank you for your efforts! |
| 55 | + |
| 56 | +## How to Clone This Repository |
| 57 | +To get started with this project, you need to clone the repository to your local machine. Follow these steps: |
| 58 | + |
| 59 | +1. Open your terminal. |
| 60 | +2. Run the following command: |
| 61 | + ```bash |
| 62 | + git clone https://github.com/your-username/flappy_bird_game.git |
| 63 | + ``` |
| 64 | +3. Navigate to the project directory: |
| 65 | + ```bash |
| 66 | + cd flappy_bird_game |
| 67 | + ``` |
| 68 | +4. Update the homepage.dart file according to the given tasks |
| 69 | + |
| 70 | +## Prerequisites |
| 71 | +- Install Flutter: [Flutter Installation Guide](https://flutter.dev/docs/get-started/install) |
| 72 | +- Basic understanding of Dart and Flutter (not mandatory; hints are provided). |
| 73 | + |
| 74 | +## Running the Project |
| 75 | +1. Ensure Flutter is installed and set up on your system. |
| 76 | +2. Run the following commands in your terminal: |
| 77 | + ```bash |
| 78 | + flutter pub get |
| 79 | + flutter run |
| 80 | + ``` |
| 81 | + |
| 82 | +## Missing Features |
| 83 | +This game is a work in progress, and there are some features that are not yet implemented: |
| 84 | + |
| 85 | +1. **Barrier Code Implementation** |
| 86 | + - The logic for dynamically generating barriers and their movement is incomplete. |
| 87 | + |
| 88 | +2. **Score Monitoring** |
| 89 | + - A scoring system to track the player's progress is missing. |
| 90 | + |
| 91 | +### How You Can Contribute |
| 92 | +- You can raise issues for these missing features or any other bugs you find. |
| 93 | +- If you'd like to work on a feature, comment on the issue and request to be assigned. |
| 94 | +- Once you complete the feature, submit a pull request (PR) for review. |
| 95 | + |
| 96 | +We encourage you to contribute and make this project even better! |
| 97 | + |
| 98 | +## Additional Notes |
| 99 | +- Feel free to ask questions or seek help during the festival. |
| 100 | +- Have fun and enjoy learning Flutter! |
| 101 | + |
| 102 | +## License |
| 103 | +This project is open-source and available under the [MIT License](./LICENSE). |
0 commit comments