A Unity 6 single-player Pong game with difficulty scaling and persistent local leaderboards.
Ping Pong is a 2D arcade game where one player rallies against a computer-controlled paddle. Enter a player name, choose a difficulty, and keep the ball in play while its speed increases through the rally.
Each successful return adds one point. Sending the ball past the computer adds ten points and starts another serve; missing the ball ends the run and saves the score to the leaderboard for the selected difficulty.
This repository contains the Unity source project. It does not include a packaged, ready-to-run player build.
These title assets are used by the Unity menu and leaderboard scenes; they are project artwork rather than gameplay captures.
| Main menu title | Leaderboard title |
- Three difficulty modes tune ball acceleration and paddle movement for Easy, Medium, and Hard play.
- Position-based rebounds change the ball's vertical direction according to where it meets a paddle.
- Persistent local scores are stored separately for each difficulty and displayed from highest to lowest.
- Complete scene flow connects player setup, gameplay, and leaderboard screens.
- Start from the main menu and enter a player name.
- Select Easy, Medium, or Hard.
- Move the player paddle vertically and return the ball past the AI paddle.
- When the run ends, review the saved score on the matching difficulty leaderboard.
| Input | Action |
|---|---|
W or Up Arrow |
Move the player paddle up |
S or Down Arrow |
Move the player paddle down |
git clone https://github.com/Dev0910/Ping-Pong.git
cd Ping-Pong
git lfs pull- In Unity Hub, choose Add and select the cloned
Ping-Pongdirectory. - Open the project with Unity Editor
6000.0.24f1. - Open
Assets/Scenes/MainMenu.unityif it is not already active. - Press Play in the Unity Editor.
- Open File > Build Profiles in Unity.
- Select the included New Windows Profile.
- Switch to the Windows platform if Unity prompts you to do so.
- Choose Build and select an output directory outside the repository.
The build profile includes the scenes in their intended order: MainMenu, Game, and Leaderboard.
- Engine: Unity
6000.0.24f1 - Language: C#
- Rendering: Unity 2D feature set
2.0.1with Universal Render Pipeline17.0.3 - Input: Input System
1.11.2, with paddle movement mapped through Unity'sVerticalinput axis - Interface: TextMesh Pro and Unity UI
2.0.0 - Persistence: Json.NET
3.2.1and JSON files underApplication.persistentDataPath
Assets/
├── Scenes/ # Main menu, gameplay, and leaderboard scenes
├── Scripts/
│ ├── Leader Board/ # Local score storage, sorting, and display
│ ├── Manager/ # Persistent game state and difficulty selection
│ ├── Movement/ # Player, AI, ball, scoring, and rebound logic
│ └── UI/ # Name input, menus, and scene navigation
├── Settings/ # URP assets and the Windows build profile
└── Sprites/ # User-interface and game artwork
Packages/ # Unity package manifest and lockfile
ProjectSettings/ # Unity editor, input, scene, and player settings
Created by Dev Patel. Explore the portfolio for more game-development work.
This repository does not currently include a project-level license. Some bundled content comes from third-party asset packages and may be governed by separate terms. Review the original asset documentation before reusing or redistributing those files.