Arcade action, score chasing, and clean Unity gameplay systems.
Built for a clean portfolio-style GitHub presentation with gameplay, UI, and scene-management systems.
| ๐ฏ Responsive Controls Horizontal movement feels immediate and is clamped inside the play area. |
๐ฅ Arcade Combat Fire projectiles, destroy enemies, and keep the action moving. |
| ๐ง Clean Game Flow Start, pause, resume, restart, and game over states are managed centrally. |
๐ฅ Hit Feedback Explosion particles and sound effects give every hit impact. |
| ๐ Score & Health UI TextMesh Pro keeps the HUD readable and polished. |
๐งฉ Reusable Systems Spawner, player, projectile, and menu logic are separated into focused scripts. |
- Project Overview
- Gameplay GIF
- Feature Cards
- Features
- Gameplay Mechanics
- Controls
- Technologies Used
- Unity Version Compatibility
- Folder Structure
- Installation and Setup
- How to Play
- Scripts and Modules
- Screenshots
- Future Improvements
- Contribution Guidelines
- License
- Author
Ball Blast Game is a Unity-based arcade project inspired by the ball-blast genre. The core loop is simple and responsive: move horizontally, fire projectiles, eliminate enemies, and stay alive as long as possible while the score climbs. The project is intentionally lean, making it a strong open-source portfolio example for gameplay scripting, scene setup, prefab workflows, and UI-driven game state management.
The repository contains a single playable scene, reusable prefabs, TextMesh Pro UI, sound and particle feedback, and a small set of focused scripts that separate responsibility cleanly across player movement, enemy spawning, collision handling, scoring, health, and menus.
- Fast arcade gameplay with immediate restart/pause flow.
- Horizontal movement constrained to the arena bounds.
- Projectile spawning with audio feedback.
- Enemy spawning on a timer at randomized X positions.
- Score and health tracking through a central game manager.
- Game over state with time freeze.
- Start menu and pause menu UI.
- Explosion particles and hit sounds for impact feedback.
- TextMesh Pro UI for crisp in-game text rendering.
| Mechanic | Behavior |
|---|---|
| Movement | The player moves left and right with horizontal input and is clamped inside the play area. |
| Shooting | Press Space to spawn a projectile from the player position. |
| Enemies | Enemies spawn repeatedly after a short delay at random X positions. |
| Collision | Projectiles destroy enemies, and enemies that reach the player reduce health. |
| Scoring | Destroying enemies adds points to the score. |
| Health | The player begins with 3 health; reaching zero triggers game over. |
| Menus | The game opens on the start menu and supports pause, resume, restart, and quit actions. |
| Input | Action |
|---|---|
| A / D or Left / Right | Move the player horizontally |
| Space | Fire a projectile |
| Escape | Pause or resume the game |
| Mouse / UI buttons | Start, restart, resume, or quit through the menus |
| Technology | Purpose |
|---|---|
| Unity | Game engine, scene management, physics, and prefab workflow |
| C# | Gameplay, UI, input, and menu logic |
| TextMesh Pro | Score, health, and menu text rendering |
| Unity Physics | Trigger-based collision detection |
| Particle System | Explosion and hit feedback |
| AudioSource / AudioClip | Shooting and hit sound effects |
| SceneManager | Reloading the active scene for restart flow |
| Unity Input Manager | Runtime movement and firing controls used by the scripts |
| Input System asset | Included in the repository for future input expansion |
The repository snapshot does not include ProjectSettings/ProjectVersion.txt, so the exact editor version cannot be confirmed from the source tree alone.
| Compatibility | Notes |
|---|---|
| Recommended | Unity 2021.3 LTS or newer |
| Expected support | Recent Unity LTS releases with TextMesh Pro and standard 3D physics |
| Notes | The current scripts use classic input methods, while the repo also includes an Input System action asset |
| Path | Description |
|---|---|
Scenes/ |
Main playable scene (SampleScene.unity) |
Prefabs/ |
Enemy, projectile, and explosion prefabs |
Materials/ |
Materials for the game objects and environment |
2D Space Backgrounds/ |
Background art assets used for the scene look |
Sprites/ |
Sprite assets for visual elements |
TextMesh Pro/ |
TMP fonts, resources, shaders, and settings |
EnemySpawner.cs and other root scripts |
Core gameplay, collision, UI, and menu logic |
InputSystem_Actions.inputactions |
Input System action asset included with the project |
_Recovery/ |
Unity recovery data generated by the editor |
- Clone or download the repository.
- Open the project folder in Unity Hub.
- Use Unity 2021.3 LTS or a newer compatible version.
- Open
Scenes/SampleScene.unity. - Allow Unity to import TextMesh Pro and any required package dependencies.
- Press Play to launch the game.
If references are missing after opening the scene, check the inspector assignments for GameManager, MenuManager, PlayerMovement, and EnemySpawner.
- Click Start on the main menu.
- Move left and right to dodge incoming enemies.
- Press Space to fire projectiles.
- Destroy enemies before they reach you.
- Watch score and health in the HUD.
- Press Escape to pause or resume.
- When health reaches zero, the game shows Game Over and pauses time.
| Script | Responsibility |
|---|---|
PlayerMovement.cs |
Reads horizontal input, clamps the player to the arena bounds, spawns bullets, and plays shoot audio. |
MoveForward.cs |
Moves projectile objects forward each frame. |
EnemySpawner.cs |
Instantiates enemy prefabs at random X positions on a repeating timer. |
Enemy.cs |
Moves enemies toward the player and applies score/damage handling on collision. |
DestroyOnContact.cs |
Alternate hit-response script that plays explosion and sound effects when a projectile collides. |
GameManager.cs |
Tracks score and health, updates the HUD, and triggers the game over state. |
MenuManager.cs |
Handles start, pause, resume, restart, and quit behavior through the UI. |
HealthSystem.cs |
Lightweight health helper kept in the project for reusable or legacy health logic. |
Add screenshots here to complete the repository presentation.
| View | Placeholder |
|---|---|
| Main Menu | Add a screenshot of the start screen |
| Gameplay | Add a screenshot of active gameplay |
| Game Over | Add a screenshot of the game over state |
- Add progressive difficulty scaling.
- Introduce multiple enemy types with distinct behavior.
- Add power-ups such as spread shot, shield, or rapid fire.
- Store and display a high score.
- Improve visual polish with hit flash, screen shake, and transitions.
- Add mobile-friendly touch controls.
- Expand audio with background music and layered sound effects.
- Create separate menu and gameplay scenes for a more production-ready flow.
Contributions are welcome. To keep the project clean and easy to review:
- Fork the repository and create a feature branch.
- Keep changes scoped and readable.
- Test gameplay changes inside Unity before opening a pull request.
- Update the README if controls, systems, or setup steps change.
- Prefer small, focused commits.
This project is licensed under the MIT License. See the LICENSE file for the full text.