BirdieDash MiniGame - UQcsse3200/2024-studio-2 GitHub Wiki

Overview

The BirdieDash Mini-Game is an exciting addition to the main game, inspired by the popular Flappy Bird game. In this mini-game, players control a bird character as it flies through a series of pipes while avoiding obstacles such as the pipes and the spike. The goal is to navigate through the pipes, collect coins, and achieve the highest score possible.

Game Mechanics

Controls

The BirdieDash mini-game features simple yet challenging controls:

  • Spacebar / Tap Screen: Flap the bird to ascend.
  • Gravity: The bird falls automatically, requiring precise timing to stay airborne and navigate through obstacles.

Birdie Dash Pop-Ups

Before the Birdie Dash game begins, a pop-up screen will appear with all the essential instructions. It will guide players on how to control the bird, explaining the key movements, actions, and how to navigate through obstacles. The pop-up will introduce the main character, the bird, along with any other key elements or objects the player will encounter. It will also clearly state the objective of the game, such as how to earn points by flying as far as possible and dodging obstacles, as well as how to win. Additionally, how to pause/ restart or exit the game.

Scoring

  • Pipes and Spikes: Colliding with the pipes and spikes results in a game over.
  • Coins: Collecting coins adds points to the score.

The score is displayed prominently on the game screen and updates in real-time as the player progresses, collecting the coins.

The High Score is now saved and carried over for the next gameplay session. Refer to the images below:

Game Elements

Bird

The Bird class represents the player's character, which is controlled to fly through the game. The Bird class handles the bird's flapping and gravity effects, as well as its collision with game elements.

  • The bird's position and velocity are controlled based on player input and gravity.
  • The bird can collect coins and must avoid spikes and pipes.

These images also shows how the birds animate.

Pipes

The Pipes class manages the obstacles the bird must navigate through. Pipes are generated at regular intervals and move horizontally across the screen.

  • Each pipe pair consists of an upper and lower pipe with a gap for the bird to pass through.
  • Pipes are positioned randomly within a certain range to increase difficulty.

Spikes

The Spikes class represents additional obstacles that appear randomly and pose a challenge to the player.

  • Spikes are placed at the side of the screen, increasing the difficulty of the game.
  • Colliding with a spike results in an immediate game over.

Coins

The Coins class represents collectible items that increase the player's score.

  • Coins appear randomly within the game and are positioned to reward skilled play.
  • Collecting coins adds points to the player's score.

This image shows how the coins animates.

Game Grid

The GameGrid class provides the background and management of the game area where the bird, pipes, spikes, and coins interact. It handles the placement and movement of game elements and manages collisions.

BirdieDash Screen

The BirdieDashScreen class manages the game's various states, including starting the game, updating the game, and displaying the end-of-game screen.

Image of the BirdieDash Screen.

The Birdie-Dash Game uses the MiniGame Renderer.

End Screen

The EndBirdieDashScreen class displays the player's final score, saves the high scores and awards medals based on performance, and offers options to restart or return to the mini-game menu.

  • Fail: If the score is less than 10, the end screen will indicate a fail, without any medal.
  • Bronze: For scores of 10 or greater but less than , the end screen will turn bronze.
  • Silver: If the score is 20 or greater but less than 10, the end screen will be silver.
  • Gold: For scores of 35 or above, the end screen colour will be gold.

Game Flow

  1. Initialisation: The game starts with the bird and a set of pipes, spikes, and coins randomly placed on the screen.
  2. Gameplay: The bird flies through the screen, controlled by the player’s input. The player must navigate through pipes, avoid the spike, and collect coins.
  3. Obstacle Collision: Colliding with pipes or spikes ends the game.
  4. Coin Collection: Collecting coins increases the score and adds to the overall gameplay experience.

Wireframes

Wireframe for the Mini-Game Menu Screen

Wireframe for the BirdieDash Game Screen

Sequence Diagram

UML Diagram

UML Diagram for the main Classes (Bird, Coin, Pipe and Spike)

UML Diagram for Rendering (Background, Bird, Coin, Pipe and Spike)

Testing Plans

For a comprehensive overview of the testing approach, including details on the classes that have been tested as well as those that remain to be tested, please refer to the Birdie-Dash Testing Plan Wiki