Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
2D Platformer Game Development Crash Course for Unity 2022
Rating: 4.5 out of 5(17 ratings)
172 students

2D Platformer Game Development Crash Course for Unity 2022

Unity GameDev from Scratch to Create Platformer Characters and Game Mechanics
Created byChris Tutorials
Last updated 11/2022
English
English [Auto],

What you'll learn

  • How to Create a Platformer Player with Ground & Air Sword Swing Combos and a Ranged Bow Attack
  • Make ground and air enemies with basic enemy AI
  • Build a game level with tileset and tilemap tools
  • Setup up player input with the InputSystem package and UnityEvents
  • Learn about animation state machines and using AnimationStateBehaviours to control complex characters
  • Create a health pickup item to keep your player alive

Course content

1 section26 lectures7h 30m total length
  • Project Setup5:58

    Finished project is provided in the materials. You will still have to install the art packs as shown in 'Installing Art Packs' lecture.

  • Installing Art Packs8:23

    Finished project is provided in the materials. You will still have to install the art packs as shown in 'Installing Art Packs' lecture.

  • Installing Unity Packages and PlayMode Settings3:17

    Install the cinema machine and input system packages in the Unity editor via the Unity registry, then enable faster testing by turning off play mode domain reload.

  • Adding Background Image and Layer5:20

    Create a multi-layered background in Unity by adding three sprite-backed game objects with a sprite renderer, tiling them, and assigning a background sorting layer below default to ensure foreground renders.

  • Player Input Left and Right Movement20:22

    Create a 2D platformer player with a sprite renderer and Rigidbody2D, wire Unity input actions for left-right movement, and implement a velocity-based player controller.

  • Cinemachine Follow Camera3:29

    Learn to implement a Cinemachine follow camera in Unity 2022, enabling crisp pixel-art tracking, adjustable damping, look ahead time, smoothing, and dead zone settings to follow the player smoothly.

  • Parallax Background8:40

    Attach a parallax effect to background layers in Unity, use the camera movement and a parallax factor to shift each layer at different speeds, creating depth in a 2D platformer.

  • Controlling Walk, Run, Idle Animations27:41

    Implement a Unity 2D platformer animation system with idle, walk, and run clips. Drive transitions using is moving and is running, and flip the player by scaling for left-right facing.

  • Managing Animator Parameters with Static Strings3:34
  • Ground Tileset14:36
  • Jumping and Air Movement33:34
  • Attack Animation and Movement Lock14:30
  • Making a Knight Enemy Move22:44

    Create a knight enemy in a Unity 2d platformer, using a sprite renderer, animator, and prefab; drive movement with a dynamic rigidbody and edge-flipping ai using touch directions.

  • Enemy Attack AI and Animation States22:40

    Deploy a knight enemy in a 2D Unity platformer with attack AI and animation states; implement an animator controller and a detection zone to trigger attacks.

  • How to Make Characters Take Damage17:18

    Create a damage component that manages max health and current health, implements invincibility, triggers death states and death animations, and fades out to remove defeated characters.

  • Attack Hits with Damage and Knockback43:16

    Learn to implement attack hits with damage and knockback in Unity 2D, using hit colliders, animation-driven enablement, and a damage system with invincibility and knockback events.

  • Knight Enemy Improvements14:46
  • Create Floating Damage Text on UnityAction22:08

    Create floating damage and healing text with Text Mesh Pro in Unity, using a UI manager and a global Unity action to spawn, move, fade, and remove numbers above characters.

  • Make a Healing Pickup Item11:49

    Create a healing pickup in a 2d platformer using a health restore item with a trigger collider and a max health cap.

  • Combo Sword Attack16:22

    Create a three-hit sword combo in Unity by adding attack two and attack three animations with separate colliders and per-hit damage, then chain them via exit-time transitions and triggers.

  • Make a Bow and Arrow Ranged Attack22:21

    Implement a bow and arrow ranged attack in Unity: animate bow, fire a kinematic arrow via an animation event, spawn from a launcher, and apply damage and knockback.

  • How to Make a Flying Enemy45:55

    Create a flying eyeball enemy in Unity that ignores gravity, uses a capsule collider and damage component, moves between waypoints, attacks via a bite, and fades out on death.

  • Aerial Sword Attacks Setup12:27

    Add aerial sword attacks in Unity by creating air attack clips, enabling hit colliders on key frames, and setting damage values with animator transitions for fluid air combat.

  • Export Game Build and Make a Exit Game Action7:35

    Export and test a 2D platformer in Unity by adding a UI driven exit action mapped to the Escape key, ensuring clean exits in full screen builds.

  • Sound Effects and Music16:42

    Create immersive audio for a 2d platformer by implementing music with intro and loop audio sources, and triggering weapon and hit sound effects through animation states.

  • UI Health Bar & Final Quick Fixes25:10

    Configure a canvas scaler to scale UI with screen size. Place a health bar at the top left with a slider and text, updating via health changed events.

Requirements

  • I recommend using Unity 2022.1.20f for the project to avoid problems from have a different editor version
  • You should have some knowledge of how to program to understand basic concepts. This course is code heavy. All code is done live on screen so you can copy directly when needed.

Description

Learn how to create a 2D platformer game inside of Unity 2022. This course shows you how to build player and enemy characters for movement and combat within a side scrolling platformer game. Much of the course is dedicated to understanding Animators in unity as we build out full animation state machines for both the player and enemy characters. To go along side the states and transitions are StateMachineBehaviour scripts which let you queue up changes and effects for your characters when entering or leaving states. For instance, this is very helpful when you want to make a character jump upon entering a jump state when the jump action is pressed on your keyboard. To make player input go smoothly, we use the new InputSystem to set keybinds to actions and respond to those actions triggering through UnityEvents. To make the game more complete, we make use of Cinemachine follow camera, parallax background, health pickups, sound, and tilesets to continue building out our demo game. Many of the scripts are intentionally designed to be reusable like the Damageable script which lets any character take damage or be healed on triggering events.


The final course project with all source files are provided in the course for you to use or reference in any of your own projects!


  • Player Controller, Movement and Physics

  • Animation State Machines for Players and Enemy Characters

  • Dealing Damage to Player and Enemy Characters

  • Working with Tilemaps and Tilesets to Build Game Levels

  • Basic Enemy AI Patterns

  • Ranged Attacks

  • Aerial Attacks

  • Combo Attacks

  • AnimationStateBehaviours for triggering changes on events

  • Healing Health Pickups

  • Music & Sound

  • How to Export a Game

  • Cinemachine Follow Camera

  • Input System Actions and UnityEvents for handling player input

  • Floating damage text

  • And more...

Who this course is for:

  • Aspiring game developers
  • Looking to make a 2D, Platformer, Pixel Art, or Unity Engine Game