← Back to projects

2D top-down action RPG · Unity 6

Legend of the Forest

A 2D top-down action RPG built in Unity 6. Three weapons, a stamina-based dash, enemies with distinct attack patterns, destructible props, and fade transitions between scenes.

Overview

You move between a town and combat areas, swap weapons, spend stamina to dash, and fight enemies that behave differently.

The player moves with WASD and aims the weapon with the mouse. Left click attacks; Space dashes. A dash spends one stamina cell, and cells refill over time or from stamina globes. Health comes from heart pickups. Gold drops from enemies and breakable objects.

Weapons

All three weapons are defined as ScriptableObjects and swapped from the hotbar (1–3).

  • Sword

    Melee. Up and down swings with slash VFX.

  • Bow

    Ranged arrows.

  • Staff

    Ranged magic laser.

Enemies

Enemies share one AI state machine (roam / attack). The attack itself is swapped through an interface, so each enemy keeps its own behavior without duplicating the AI.

  • Blue Slime

    Closes the distance and deals contact damage.

  • Ghost

    Fires burst, spread, and oscillating projectiles.

  • Grape

    Arcing projectiles with a shadow and a splatter on impact.

Combat & world

Architecture

Written in C#. The project uses the URP 2D renderer, a Cinemachine follow camera, the New Input System, Tilemap with Rule Tiles, Animator, and uGUI / TextMeshPro. Weapon and enemy behavior sit behind IWeapon and IEnemy. Shared systems are singletons.

Controls

Input Action
WASD Move
Mouse Aim weapon
Left click Attack
Space Dash (spends stamina)
1 / 2 / 3 Sword / Bow / Staff

Technologies

Unity 6 (6000.3) C# URP 2D Cinemachine 3 Input System 2D Tilemap & Rule Tiles Animator ScriptableObjects uGUI / TextMeshPro Physics2D

Features