A dynamic 2D pixel-art platformer game built using Unity 6 and C#. The player controls a heroic knight navigating through obstacles, collecting valuable HeartCoins, and dodging wild enemies like boars to reach the finish point.
- 2D Physics Movement: Smooth horizontal movement and jumping physics using Unity's 2D Rigidbody system.
- Global 2D Lighting: Utilizes Unity 6's native Universal Render Pipeline (URP) 2D Global Light to create an immersive environment.
- Collectible & Score System: A trigger-based collision system that detects when the player collects a
HeartCoin, calculating and updating the score UI. - Health & Hazard System: Dynamic damage system where colliding with patrolling enemies (like the boar) decreases player health, leading to a Game Over or scene reset.
- UI & State Management: Features a fully functional Main Menu, Pause Menu, and Finish Point mechanism to transition between game states.
- Game Engine: Unity 6 LTS (Version: 6000.3.2f1)
- Language: C#
- Graphics/Render Pipeline: Universal Render Pipeline (URP) 2D
The architecture splits the game logic into dedicated, clean C# scripts located in Assets/Scripts:
PlayerMovement.cs– Handles keyboard inputs, running velocity, and jumping states.PlayerHealth.cs– Manages the knight's health points, damage taken from hazards, and death triggers.CoinCalculation.cs– Tracks collected HeartCoins and updates the user interface.Enemy1walk.cs– Contains the AI patrolling movement logic for field enemies like the boar.MainMenu.cs&Pausemenu.cs– Manages user interface interaction, pausing time, and scene loading.
| Editor & Environment View | Gameplay Scene |
|---|---|
![]() |
![]() |
![]() |
![]() |
- Clone or Download this repository to your local computer.
- Open Unity Hub and click Add project from disk.
- Select this project folder. Make sure you have Unity 6 installed.
- Open the main menu scene located at
Assets/Scenes/GameMenu.unity. - Press the Play button inside the editor to test the game!




