beginner

2D Platformer Starter Kit

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

6 scripts · 18 KB
Platformer Best first system — perfect starting point

Features

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
Collectible items with bobbing animation and magnet pull
Screen fade transitions between levels

Included Scripts

/2d-platformer-kit/

Setup Guide

1

Import all scripts into your Unity project

2

Create a Player object with Rigidbody2D and BoxCollider2D

3

Attach PlayerController2D and PlatformerMechanics2D

4

Create GroundCheck and WallCheck child transforms

5

Set up camera with CameraFollow2D targeting the player

6

Add HealthSystem component to the player

7

Create collectible prefabs with the Collectible script

8

Add ScreenFader to a UI Canvas for level transitions

Code Preview

C#
// PlayerController2D.cs - Smooth 2D movement
[RequireComponent(typeof(Rigidbody2D))]
public class PlayerController2D : MonoBehaviour
{
    [SerializeField] private float moveSpeed = 8f;
    [SerializeField] private float jumpForce = 16f;
    [SerializeField] private float coyoteTime = 0.15f;
    // ... full controller with variable-height jump
}

// PlatformerMechanics2D.cs - Advanced movement
public class PlatformerMechanics2D : MonoBehaviour
{
    [SerializeField] private bool enableWallJump = true;
    [SerializeField] private bool enableDoubleJump = true;
    [SerializeField] private bool enableDash = true;
    // ... wall slide, wall jump, dash, double jump
}

Available Individually

These scripts are also available as standalone downloads:

Related Systems