A high-octane 3D endless runner built in Unity. Survive the track by switching lanes, sliding under barriers, and leaping over obstacles while collecting coins in a dynamically generated world.
Gameplay Video โข Installation โข Architecture โข Contributing
Endless Runner Game is a lightweight, highly modular 3D endless runner designed to showcase clean code architecture and core gameplay loops in Unity. Players must navigate a continuously spawning, accelerating track utilizing a three-lane movement system.
Built with the Universal Render Pipeline (URP), this project features robust audio management, dynamic object pooling (tile spawning), and a clean, responsive UI system. It serves as an excellent foundational template for portfolio presentation, rapid prototyping, or expanding into a full-scale mobile/PC release.
| Feature | Description |
|---|---|
| ๐ฃ๏ธ Dynamic Lane Control | Smooth, responsive transition mechanics between three distinct lanes. |
| ๐ฆ Parkour Mechanics | Context-sensitive jump and slide actions to dodge varying obstacle heights. |
| โพ๏ธ Infinite Generation | Optimized dynamic tile spawning and cleanup system for infinite, memory-efficient gameplay. |
| ๐ Progressive Difficulty | Automatic forward movement with a gradual speed acceleration cap to increase tension. |
| ๐ช Risk/Reward Economy | Collectible coins strategically placed to challenge player routing and increase scores. |
| ๐ Immersive Audio | Persistent singleton-based audio manager for seamless BGM and distinct SFX. |
| Action | Control Input | System Response |
|---|---|---|
| Start Game | Left Mouse Click |
Transitions from Main Menu to gameplay state. |
| Lane Switch | Left/Right Arrows |
Smoothly interpolates the player's X-axis to the adjacent lane. |
| Jump | Up Arrow / Space |
Applies vertical force (only if grounded) to clear low obstacles. |
| Slide | Down Arrow |
Triggers slide animation and dynamically shrinks the character's collider. |
Objective: Survive as long as possible, maximize your coin count, and adapt to the increasing speed without colliding with any track obstacles.
- Game Engine: Unity 6.4.5f1 (6000.4.5f1 LTS recommended)
- Render Pipeline: Universal Render Pipeline (URP)
- Scripting: C# (Object-Oriented Design)
- UI Framework: Unity UI & TextMeshPro
- Target Platforms: Windows / macOS / WebGL
The codebase is structured for readability, making it highly extensible for future mechanics (like power-ups or enemies).
PlayerMovement.cs: The core state machine handling physics, input parsing, lane logic, and collision detection.TileManager.cs: Handles procedural level generation. Spawns new track prefabs ahead of the player and destroys trailing ones to maintain optimal performance.PlayerManager.cs: Controls the high-level game state (Start, Pause, Game Over) and manages the UI score updates.AudioManager.cs&Sounds.cs: A scalable, persistent audio system utilizing arrays of custom sound classes for easy inspector tweaking.
Assets/
โโโ Animations/ # Player state animations (Run, Jump, Slide, Crash)
โโโ Materials/ # URP-compatible materials
โโโ Models/ # 3D meshes for player, obstacles, and environment
โโโ Prefabs/ # Reusable GameObjects (Track Tiles, Coins, Obstacles)
โโโ Scenes/ # MainMenu, Level (Gameplay)
โโโ Scripts/ # Core logic, divided by responsibility
โโโ Sounds/ # BGM and SFX audio clips
- Unity Hub installed.
- Unity Editor version 6000.4.5f1 (or a closely compatible Unity 6 build).
- Clone the repository:
git clone [https://github.com/zeeshan020dev/Endless-Runner-Game.git](https://github.com/zeeshan020dev/Endless-Runner-Game.git)
- Open in Unity: Add the project folder via Unity Hub and open it. Allow Unity to resolve packages from
manifest.json. - Configure Build Settings:
- Go to
File > Build Settings. - Ensure
Assets/Scenes/MainMenu.unityis at index0. - Ensure
Assets/Scenes/Level.unityis at index1.
- Play: Open the
MainMenuscene and press the Play button in the editor.
Click the image above to view the raw gameplay recording, or download it here.
(Note: For the best GitHub experience, consider uploading your recording to YouTube and replacing YOUR_YOUTUBE_VIDEO_ID in the image URL above, linking directly to the video).
- Power-up System: Invincibility shields, coin magnets, and score multipliers.
- Mobile Optimization: Implement touch/swipe gesture controls for iOS/Android builds.
- Environment Biomes: Dynamic visual swapping of tiles as the run progresses.
- Data Persistence: Local saving for High Scores and Total Coins using PlayerPrefs or JSON.
- Game Feel Polish: Camera shake on near-misses, particle bursts on coin pickup.
Contributions, issues, and feature requests are highly encouraged! This is a great project for learning Unity mechanics.
- Fork the project.
- Create your Feature Branch (
git checkout -b feature/AmazingFeature). - Commit your changes (
git commit -m 'Add some AmazingFeature'). - Push to the Branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
This project currently does not have an explicit open-source license.
(If you intend for others to use/modify this code, consider adding an MIT or Apache-2.0 license file to the root directory.)
Co-Founder โ Unicodrex | Unity Game Developer