Skip to content

rowidaEl/2D_RPG_Kill-Skeleton_Level1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2D RPG Defense Game – Unity Project

Overview

This project is a 2D RPG-style defense game developed in Unity using C# scripting.

The game takes place in a single level where the player must protect a small girl (NPC) positioned at the center of the scene from waves of skeleton enemies. Skeletons continuously spawn from both sides of the screen and move toward the center, attempting to attack both the player and the girl. The player must defeat the enemies and prevent them from reaching the girl.

All gameplay systems and scripts were implemented by me from scratch while following a learning tutorial from AlexDev on youtube.

Gameplay

The player controls a character positioned near the center of the scene while protecting a small girl standing nearby. Skeleton enemies spawn from the left and right edges of the screen and walk toward the center. The player must intercept and defeat them before they reach the girl.

If enemies reach the girl or defeat the player, the game ends.

Game Objective

The goal of the game is to:

1- Protect the girl (NPC) in the center of the scene. 2- Defeat skeleton enemies before they reach her. 3- Survive the incoming enemy waves as long as possible.

Start Scene Overview

skeleton1 2

Player Mechanics

The player character supports several core actions:

Movement

  • Move left
  • Move right
  • Jump to reposition and avoid enemies

Combat

  • The player can attack enemies
  • Successful hits eliminate skeleton enemies

Player attack overview

skeleton2 skele6

Animation System

The game includes a basic 2D animation system using Unity’s Animator.

Animations implemented include:

  • Player idle animation
  • Player fall animation
  • Player jump animation
  • Player attack animation
  • Player move animation
  • Enemy move animation
  • Enemy attack animation
  • Enemy idle animation

Animations are controlled through the Animator Controller, which switches between states based on player movement, actions, and enemy behavior.

Skeleton attack overview

skeleton1 2

UI System

The game includes a simple but functional UI system that helps track gameplay progress and game state in real time.

Time Tracking

  • A timer is displayed on the screen during gameplay.
  • It tracks how long the player has survived in the current run.
  • This helps measure endurance against increasing enemy pressure.

Kill Count

  • A kill counter is shown on the UI.
  • It increases each time the player defeats a skeleton enemy.
  • It provides feedback on player performance and combat efficiency.

Game Over Screen

  • A Game Over UI appears when the player loses the game. This happens if:
    • The player is defeated or
    • The girl (NPC) in the center is reached by enemies. -It gives a clear visual indication that the run has ended.

Game Over UI

skeleton3

Technical Features

This project demonstrates implementation of:

  • 2D character movement mechanics
  • Combat and attack systems
  • Enemy spawning systems
  • Health and damage systems
  • Sprite-based 2D animations
  • Unity Animator Controller for animation state transitions

Technologies Used

  • Unity
  • C#
  • Unity Animator System
  • 2D Sprite Animation
  • Unity Physics

About

Unity 2D RPG defense game featuring combat, enemy spawning, and UI systems (timer, kill count, game over) where the player must protect a central NPC from endless skeleton waves.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors