An open API service indexing awesome lists of open source software.

https://github.com/khaled71612000/unity-platformer

Unity Platformer is a project that demonstrates the creation of a platformer game using the Unity game engine.
https://github.com/khaled71612000/unity-platformer

unity

Last synced: 3 months ago
JSON representation

Unity Platformer is a project that demonstrates the creation of a platformer game using the Unity game engine.

Awesome Lists containing this project

README

          

# Unity Platformer

![Unity](https://img.shields.io/badge/Unity-000000?logo=unity&logoColor=white)
![C#](https://img.shields.io/badge/C%23-239120?logo=c-sharp&logoColor=white)
![License](https://img.shields.io/badge/license-MIT-green)

**Unity Platformer** is a project that demonstrates the creation of a platformer game using the Unity game engine. This project showcases how to develop gameplay mechanics for a platformer, including character controls, enemy AI, and level design.

## Key Components

### Scripts
- **PlayerController.cs:** Manages player movements, jumps, and interactions.
- **EnemyController.cs:** Controls enemy behaviors, including patrol and attack patterns.
- **LevelManager.cs:** Handles level transitions and game state management.

## Features

- **Character Controls:** Implements smooth and responsive player controls.
- **Enemy AI:** Includes melee and ranged enemies with simple patrol AI behavior.
- **Level Design:** Demonstrates techniques for creating engaging platformer levels.
![image](https://github.com/khaled71612000/Unity-Platformer/assets/59780800/ff1267db-84f8-4fa2-9df0-54f86a32a94b)
![image](https://github.com/khaled71612000/Unity-Platformer/assets/59780800/38936576-50cd-4e22-ba52-b077601dc30d)

## Screenshots

![Screenshot 1](https://raw.githubusercontent.com/khaled71612000/Unity-Platformer/HEAD/Assets/Sprites/Arrows_pack.png)

![Screenshot 2](https://raw.githubusercontent.com/khaled71612000/Unity-Platformer/HEAD/Assets/Sprites/Character/Dragon Warrior PNG/attack_01.png)

![Screenshot 3](https://raw.githubusercontent.com/khaled71612000/Unity-Platformer/HEAD/Assets/Sprites/Character/Dragon Warrior PNG/attack_02.png)

![Screenshot 4](https://raw.githubusercontent.com/khaled71612000/Unity-Platformer/HEAD/Assets/Sprites/Character/Dragon Warrior PNG/attack_03.png)

![Screenshot 5](https://raw.githubusercontent.com/khaled71612000/Unity-Platformer/HEAD/Assets/Sprites/Character/Dragon Warrior PNG/crouch_01.png)

## Architecture

Key classes and systems (from source code):

- **`CameraController`** (extends `MonoBehaviour`) — Unity component attached to a GameObject — orchestrates game-wide systems — controls camera positioning and follow logic — Key methods: `MoveToNewRoom`
- **`PlayerAttack`** (extends `MonoBehaviour`) — Unity component attached to a GameObject — handles player input, movement, and state — neural network layer / training logic — Key methods: `Attack`, `FindFireball`
- **`PlayerMovement`** (extends `MonoBehaviour`) — Unity component attached to a GameObject — handles player input, movement, and state — neural network layer / training logic — Key methods: `Jump`
- **`EnemyDamage`** (extends `MonoBehaviour`) — Unity component attached to a GameObject — drives enemy AI behavior and decision-making — tracks hit points and applies damage — Key methods: `OnTriggerEnter2D`
- **`EnemyFireballHolder`** (extends `MonoBehaviour`) — Unity component attached to a GameObject — drives enemy AI behavior and decision-making
- **`EnemyPatrol`** (extends `MonoBehaviour`) — Unity component attached to a GameObject — drives enemy AI behavior and decision-making — Key methods: `DirectionChange`, `MoveInDirection`

## Tech Stack

| Technology | Role |
|---|---|
| Unity 3D | Game engine |
| C# | Gameplay scripting |
| Unity Physics | Rigidbody & collision |
| Git | Version control |

## Getting Started

### Prerequisites
- [Unity Hub](https://unity.com/download) + Unity 2019.4 LTS or higher
- Visual Studio 2019+ or VS Code

### Setup
```bash
git clone https://github.com/khaled71612000/Unity-Platformer.git
```
1. Open **Unity Hub** → **Add** → select the cloned folder
2. Open **Assets/Scenes/** → double-click the main scene
3. Press ▶ **Play**