Skip to content

zeeshan020dev/Endless-Runner-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

24 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿƒโ€โ™‚๏ธ Endless Runner Game

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.

Unity Version C# Platform URP

Stars Forks License

Gameplay Video โ€ข Installation โ€ข Architecture โ€ข Contributing


๐Ÿ“– Overview

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.


โœจ Key Features

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.

๐ŸŽฎ Gameplay Mechanics & Controls

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.


๐Ÿ› ๏ธ Tech Stack & Environment

  • 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

๐Ÿ—๏ธ Project Architecture

The codebase is structured for readability, making it highly extensible for future mechanics (like power-ups or enemies).

Core Scripts

  • 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.

Directory Structure

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


๐Ÿš€ Getting Started

Prerequisites

  • Unity Hub installed.
  • Unity Editor version 6000.4.5f1 (or a closely compatible Unity 6 build).

Installation

  1. Clone the repository:
   git clone [https://github.com/zeeshan020dev/Endless-Runner-Game.git](https://github.com/zeeshan020dev/Endless-Runner-Game.git)
  1. Open in Unity: Add the project folder via Unity Hub and open it. Allow Unity to resolve packages from manifest.json.
  2. Configure Build Settings:
  • Go to File > Build Settings.
  • Ensure Assets/Scenes/MainMenu.unity is at index 0.
  • Ensure Assets/Scenes/Level.unity is at index 1.
  1. Play: Open the MainMenu scene and press the Play button in the editor.

๐Ÿ“ธ Media & Previews

๐ŸŽฅ Full Gameplay Recording

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).


๐Ÿ”ฎ Roadmap

  • 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.

๐Ÿค Contributing

Contributions, issues, and feature requests are highly encouraged! This is a great project for learning Unity mechanics.

  1. Fork the project.
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature).
  3. Commit your changes (git commit -m 'Add some AmazingFeature').
  4. Push to the Branch (git push origin feature/AmazingFeature).
  5. Open a Pull Request.

๐Ÿ“„ License

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.)


๐Ÿ‘ค Author

Muhammad Zeeshan Islam

Co-Founder โ€“ Unicodrex | Unity Game Developer