Racquet AlphaZone Part 3: Game Design Document

Game Title

«Racquet AlphaZone»

Racquet AlphaZone Part 3: Game Design Document

Objective

Our objective is to recreate the classic Pong game with one user-controlled player and one AI opponent, incorporating power-ups.

Target Platform

PC/Mac

Gameplay Mechanics

Paddle Movement

The player’s paddle is user-controlled. It moves up with the ‘W’ key and down with the ‘S’ key. Movement is constrained to ensure the paddle doesn’t go off-screen.

The opponent’s paddle is AI-controlled. Its movement is driven by a simple AI script that uses predictive tracking to anticipate the ball’s position, guiding the paddle based on the ball’s current trajectory. Movement is constrained to prevent the paddle from going off-screen. The game offers three levels of difficulty (Easy, Medium, Hard) that influence the behavior of the AI.

Ball Movement

The ball’s movement is simulated using Unity’s physics system (Rigidbody2D). The ball maintains a constant speed unless affected by the Lightning power-up. Its direction changes based on collisions.

Scoring

Players earn points when the ball bypasses the opponent and reaches the corresponding boundary.

At the end of the game, only the winner is awarded points. The winner’s score is determined using the formula:

Winner’s score = (winner’s goals – loser’s goals) * points per goal * difficulty bonus.

Both the points per goal and the difficulty bonus are configured in the settings.

Power-Ups

Power-ups randomly appear throughout the play area at set intervals. They are activated upon collision with the ball. There are three types of power-ups: the Lightning Bolt, which increases the ball’s speed; the Ball Split, which introduces a second ball; and the Barrier, which activates a barrier for the player, protecting the goalpost.

User Interface

Start Scene

The start scene contains the following elements:

The main menu features three buttons: “Play,” which starts the game; “Settings,” which opens the settings menu; and “Exit,” which closes the game.

The settings menu includes three toggles to adjust difficulty (easy, normal, and hard), as well as two toggles and two sliders to mute and adjust the volume of sound FX and music, respectively.

The total score panel features two text UI elements that display the total scores for both the player and the AI from all the games they’ve played.

The credits panel displays details crediting the graphics, sounds, and music used in the game.

Lastly, the scene features the company logo and URL.

End Game Screen

The end-game scene features the end-game menu, which includes two text UI elements displaying the winner and the score. Additionally, there are two buttons that allow the player to either play again or return to the main menu.

Game Scene

The main game scene includes the following elements:

The background image, which is a simple black sprite equipped with a Box Collider 2D, representing the court where the game is played.

Text UI elements displaying the player’s score and the opponent’s score, as well as an image UI element showing the active power-up.

The top and bottom boundaries, depicted as simple black sprites with Box Collider 2D components, which confine the ball’s movement.

The goalposts for both the player and the opponent, equipped with Box Collider 2D components, which trigger scoring upon collision with the ball.

The player barrier, represented by a translucent sprite with a Box Collider 2D. When activated by the barrier power-up, it protects the player’s goalpost.

The player’s paddle, a sprite (color: #94C18A) endowed with both a Rigidbody 2D and a Box Collider 2D, is player-controlled.

The opponent’s paddle, another sprite (color: #6B3E75) with a Rigidbody 2D and a Box Collider 2D, is managed by the AI.

The ball, illustrated as a sprite (color: #DAA520) with a Rigidbody 2D and a Circle Collider 2D, moves continuously back and forth across the court.

There are occasional power-ups instantiated as prefabs, comprising three types:

The Lightning Bolt, depicted as a sprite (thunder icon) with a Circle Collider 2D, increases the ball’s speed.

The Ball Split, represented as a sprite (atomic energy icon) with a Circle Collider 2D, introduces a second ball to the play area.

The Barrier, illustrated as a sprite (shield icon) with a Circle Collider 2D, activates the player’s barrier to protect the goalpost.

Graphics

A colored image (1920×1080) for use as a background in both the start and end scenes.

A black image (1920×1080) designated for the background of the main scene.

The default power-up icon, a 512×512 image, utilized when no power-up is active.

The thunder icon, a 512×512 image, representing the lightning bolt power-up activation.

The atomic energy icon, a 512×512 image, signifying the activation of the split ball power-up.

The shield icon, a 512×512 image, indicating the barrier power-up’s activation.

The logo intended for display in the start scene.

Animations

A shake animation for the lightning bolt power-up.

A spin animation for the Split Ball power-up.

A zoom animation for the barrier power-up.

Sound Effects

A sound FX that plays when the ball collides with the paddles.

A cheerful sound FX that plays when the player scores a point.

A disheartened sound FX that plays when the AI scores a point.

A sound FX that triggers upon power-up activation.

A countdown sound FX that plays before the ball starts moving, allowing players time to prepare.

Music

Music to play in the background during gameplay.

Physics

The ball uses Unity’s physics materials for bounce behavior.

Scripting

A static class that houses all game data along with save/load functionality.

A script that governs the functions of the main menu in the start scene.

A script to refresh the total score displayed in the start scene.

A script that facilitates the functions for the end-game menu in the end scene.

A script to modify the score and adjust difficulty settings.

A script that manages the functions for the in-game menu in the main scene.

A script responsible for controlling the player’s paddle.

A script designed to enact the AI logic overseeing the opponent’s paddle.

A script to guide the movement of balls introduced by the split ball power-up.

A script that orchestrates the spawning of power-ups.

A script to visually represent the active power-up in the UI.

A script that offers the ability to pause and restart the game.

A script that orchestrates the playback of background music.

A script to trigger various sound effects during gameplay.

Development & Testing Tools

For development, we’ll use the Unity Editor (version 2021.3.19f1). Unity’s play mode and standalone builds will facilitate external testing.

How To Design A Game: Game Design Documents from GameDev Academy