Build a 2D Platformer

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

7 steps 8 scripts 1 kit beginner

The path

Add these in order. Each step builds on the one before it.

  1. Start: Basic 2D movement with coyote time and jump buffering PlayerController2D.cs · Complete 2D character controller with smooth movement, variable-height jumping, and coyote time.
  2. Add smooth camera follow with look-ahead CameraFollow2D.cs · Smooth camera follow with offset, dead zone, and look-ahead for 2D games.
  3. Add a health system with invincibility frames HealthSystem.cs · Reusable health component with damage, healing, invincibility frames, and events.
  4. Display health with an animated health bar HealthBarUI.cs · World-space or screen-space health bar with smooth fill, color gradient, and damage flash. Attach to enemies or use as HUD.
  5. Create collectible items with magnet pull Collectible.cs · Collectible item with bobbing animation, rotation, magnet pull, and event callbacks for coins, health, ammo, etc.
  6. Level up: wall jump, dash, and double jump PlatformerMechanics2D.cs · Wall jump, wall slide, dash, and double jump mechanics for 2D platformers. Drop-in extension for the 2D Player Controller.
  7. Polish: smooth transitions between levels ScreenFader.cs · Simple screen fade-in/fade-out with configurable color and duration. Great for scene transitions.

Kits for this path

Every script in this path