beginner

Build a 2D Platformer

Everything you need to create a complete 2D platformer from scratch — movement, camera, advanced mechanics, health, collectibles, and transitions.

8 scripts · 1 system

Learning Path

Follow these steps in order to build your 2D Platformer.

Included Scripts

Movement Beginner

2D Player Controller

Complete 2D character controller with smooth movement, variable-height jumping, and coyote time.

2D PlatformerGeneral
  • Variable-height jumping with configurable force
  • Coyote time for forgiving edge jumps
  • Jump buffering for responsive input queuing
2022.3+ · 3.2 KB
Movement Beginner

Smooth Camera Follow 2D

Smooth camera follow with offset, dead zone, and look-ahead for 2D games.

2D PlatformerGeneral
  • Smooth Lerp-based camera following with adjustable speed
  • Configurable offset for custom framing
  • Look-ahead in movement direction for better visibility
2022.3+ · 1.8 KB
Movement Intermediate

2D Platformer Mechanics

Wall jump, wall slide, dash, and double jump mechanics for 2D platformers. Drop-in extension for the 2D Player Controller.

2D Platformer
  • Wall slide with configurable slide speed when pressing into walls
  • Wall jump that launches away from the wall with adjustable force vector
  • Double jump (or triple+) with configurable max air jumps
2022.3+ · 3.5 KB
Health & Combat Beginner

Health System

Reusable health component with damage, healing, invincibility frames, and events.

PlatformerFPS
  • Damage and healing with clamped health values
  • Invincibility frames with configurable duration after taking damage
  • UnityEvent callbacks for health changed, damaged, healed, and death
2022.3+ · 2.4 KB
Inventory Beginner

Pickup / Collectible

Collectible item with bobbing animation, rotation, magnet pull, and event callbacks for coins, health, ammo, etc.

PlatformerRPG
  • Configurable bob and rotate animation with adjustable speed and height
  • Magnet attraction that pulls collectibles toward the player automatically
  • Supports both 3D and 2D trigger detection out of the box
2022.3+ · 2.0 KB
UI Beginner

Screen Fader

Simple screen fade-in/fade-out with configurable color and duration. Great for scene transitions.

General
  • Smooth alpha fade-in and fade-out with configurable duration
  • FadeOutAndIn combo with callback action at the midpoint
  • Configurable fade color for black, white, or custom transitions
2022.3+ · 1.6 KB
UI Beginner

Health Bar UI

World-space or screen-space health bar with smooth fill, color gradient, and damage flash. Attach to enemies or use as HUD.

RPGFPS
  • Smooth fill animation with Lerp for satisfying health changes
  • Color gradient that shifts from green to yellow to red automatically
  • Damage flash effect on the background image when health decreases
2022.3+ · 2.4 KB
UI Beginner

Damage Popup

Floating damage numbers that animate upward and fade out. Supports critical hits, healing, and custom colors.

RPGGeneral
  • Static Create() factory method — no prefab setup required
  • Separate colors for normal damage, critical hits, and healing
  • Scaled-up text for critical hits with configurable crit scale
2022.3+ · 2.6 KB

Related Systems

2D Platformer Starter Kit

beginner 6 files

Complete 2D platformer foundation with movement, camera, advanced mechanics, health, collectibles, and transitions.

Platformer
Complete character controller with coyote time and jump buffering Wall jump, wall slide, dash, and double jump mechanics Smooth camera follow with look-ahead and dead zone Health system with invincibility frames and events