A physics-based 3D endless runner developed using the Unity game engine and C#, featuring dynamic camera angles. It offers reflex-oriented gameplay similar to Geometry Dash.
Beyond a basic runner game, this project was built to test and develop specific game mechanics:
- Physics-Based Movement: Fluid movement mechanics developed using
Rigidbody. - Dynamic Camera System: A smart camera tracking system that changes its angle and height based on the player's position (Z-axis), offering cinematic transitions (
CameraFollow.cs). - Ragdoll Death Effect: Instead of a standard "Game Over" screen, upon hitting a trap, the character shatters into pieces with a physics-based explosion force applied (
Control.cs). - Persistent Death Counter: A system using
DontDestroyOnLoadand the Singleton Design Pattern to carry data across scenes and track the player's total death count (olumsayac.cs). - Regional Difficulty: Jump force and camera angle change dynamically via code in specific map regions (based on Z coordinates).
- Movement (Left/Right):
A/DorLeft Arrow/Right Arrow - Jump:
Space
The project is designed with a modular structure following Object-Oriented Programming (OOP) principles.
- Manages player movement via the physics engine (
linearVelocity). - Uses an advanced Ground Check mechanism utilizing
Physics.CheckSphere. - Upon colliding with traps (
Traptag), it destroys the character, instantiates a Ragdoll prefab, and applies an explosion effect usingAddExplosionForce.
- Follows the player smoothly using
Vector3.LerpandQuaternion.Lerp. - Hardcoded Level Design: Dynamically changes the camera's Height (Y) and follow distance using
if-elseblocks based on the player's Z position to alter the game atmosphere.
- Singleton Pattern: Ensures the death counter is managed via a single instance so it doesn't reset in every scene.
- Scene Management: Provides a fast game loop (retry mechanic) by reloading the scene directly upon restart.