
Open the linked GitHub repo to verify this video's scripts against mine, view red/green change highlights, and download the full Unity project to inspect editor settings and inspector issues.
Explore preparing assets in Unity and building a tile palette. Learn to draw ground, set a background, and manage layering while configuring the camera for a future character controller.
Explore configuring 2d assets in Unity 2020 for a platformer, including sprite type, sprite mode, pixels per unit, filter, compression, and sprite editor slicing.
Edit tilemaps in Unity 2020 by using the selection and move tools to fix tile slicing and assemble a house from a corrected tile palette.
Create and shape the ground for your 2d platformer by painting tiles with the tile palette, brush, and flood fill, using flip, rotate, and eraser tools for precise layout.
Add a multi-layer background with sky and sea sprites, set pixel per unit and filter mode, and configure sorting layers and order in layer for proper depth.
Learn how sorting layers and order in layers control rendering in Unity, and create layers such as background, agents, player, weapons, and UI to ensure proper visual stacking.
Configure the main camera for a pixel-art 2d platformer with a fixed resolution and aspect ratio, using orthographic projection and a suitable size, and disable anti-aliasing and the skybox.
Create a player agent and its avatar in a 2d Unity platformer, assign a sprite, and add Rigidbody2D and a ground collider to enable proper physics and collisions.
Add a ground collider using a 2D composite collider with a static rigidbody, then use layers to ensure ground collides only with the agent collider.
Master the player input script using multicast delegates and events for actions like attack. Define movement events with vector2 parameters and map keys for jump, attack, and menu in Unity.
Create a robust player input system in Unity by implementing get movement input, jump input, attack input, weapon swap, and menu input in the player input script, with null-conditional calls.
Explore why our current movement system is insufficient and refactor with the state pattern to keep behavior extendible, enabling future jumping, clambering, and attack logic.
See how a high-level agent script bundled with low-level movement creates tangled jumping and climbing logic, highlighting the need for refactoring and a future state pattern.
Create a reusable state pattern in Unity by designing an abstract state class with enter and exit hooks, shared data, and overridable updates for a responsive 2d platformer.
Implement an idle state in a Unity 2D platformer using the state pattern, play idle animation, halt movement, and transition to a movement state on input.
Create a movement state in Unity for a 2D platformer, using a movement data object to share speed and velocity across states, implement acceleration, and plan transitions to idle.
Learn how to add acceleration to a 2d platformer movement state in Unity. Calculate speed and horizontal direction, update velocity with movement data, delta time, and preserve gravity in rigidbody.
Create and integrate jump and fall animations using sprite frames in Unity 2020, then connect them in the player animator and loop them while testing in the project.
Set up jump and fall animations by selecting frames 11–13 and 14–16 in the animation window, then adjust the timeline; plan a ground detector script in the next video.
Create a grounded detector in Unity using a box cast to detect ground contact and a custom collider at the feet, enabling jumping only when grounded.
design a unity ground detector using a box cast offset from the collider, with a ground mask and gizmos that visualize with red and green colors when grounded.
Implement a ground detector using a box cast to determine if the agent is grounded, expose results via a detector component, and integrate checks in update and fixed update.
Learn a state-driven movement system for a 2d platformer, implementing idle, move, jump, and fall states with grounded checks and default transitions.
Override the jump state to trigger the jump animation, access the agent and animation manager to play jump and fall, and set velocity with jump force to control height.
Implement a better jump by using jump pressed to control height, apply maximum initial force, add extra gravity when released, and transition to fall state when not grounded.
Implement the fall state in Unity by adding a gravity modifier to control fall speed, extend movement state for horizontal movement, and override state methods to prevent jump transitions.
override fall state logic to play animation, apply gravity, and compute horizontal movement, then transition to idle or movement when grounded to complete the full state behavior.
Finish fall state transitions in a 2d Unity platformer using design patterns. Move to the full state when not grounded and assign full state references across movement, idle, and jump.
In section six, set up a cinema camera to follow the player avatar, adjust virtual camera settings to improve look and feel, and confine the camera to the play area.
Implement a 2d Cinemachine camera in Unity to follow the player avatar using a virtual camera, assign follow and look at targets, and adjust the orthographic size for optimal view.
Begin section seven by recalling ground and map setup for level one, then introduce onboarding, platform creation, platform component tweaks, climbing prep, map details, and parallax to create 3d illusion.
Expand the map with more ground and platforms to test jumping and onboarding, using the tile palette and grid tools to paint and copy map sections.
Edit and place ground tiles for a 2d Unity platformer, test the map with spacebar jumps, and refine visuals using brush, eraser, and color picker while planning one-way collider platforms.
Create a background tile map to render background platforms behind the ground. Set up a one-way collider so the player can jump onto them without colliding from below.
Apply the platform effector to a composite collider to create one-way platforms and improve jumping, then adjust grounded checks and the surface arc to fix edge collisions.
Paint ground tiles and background details in a Unity 2d platformer, test jumps and gaps, and adjust layer orders to reveal foreground details before adding parallax in a future video.
Develop a climbing mechanic in a 2d platformer: build a climbing animation, detector near ladders, and a climbing state that ignores gravity while integrating with the state pattern for transitions.
Create a looping climbing animation from four ladder sprites, add it to the animator as 'climbing', connect it to the avatar’s animation script, and enable ladder detection to trigger climbing.
Create a climbing detector in Unity to detect proximity to ladders using a layer mask and a can climb flag, and toggle climbing with trigger events.
Implement a climbing state in a Unity 2d platformer, wire in the climbing detector, and manage gravity, jumping, and state transitions to idle when climbing ends.
Implement the climbing state by suspending gravity, enabling controlled movement, transitioning to idle when climbing isn't possible, and using the animation manager to start and stop climbing.
Implement transitions from idle, jump, and fall states to the climbing state in Unity, enabling climbing near ladders by pressing up or down and refining movement.
Design a simple player UI in Unity with a main canvas, health and points UI, using TextMesh Pro, and implement UI logic via scripts and a master player UI class.
Learn to set up Text Mesh Pro in Unity, import the essentials, create a custom font atlas, and apply it to UI text as a replacement for legacy text.
Create and customize a health UI in Unity 2020 by building a panel, anchoring to the top-left, using sliced sprites, and arranging heart icons with a horizontal layout group.
Create a top-right points UI panel in Unity, with a bowl image and points text, placed side by side using a horizontal layout group, and fit to the panel.
Implement and manage a health user interface in Unity by creating life element UI components, instantiating prefabs, and updating full or empty sprites through a Health UI script.
Create a player UI script in Unity to manage health and points displays, initialize health, set health, and wire UI components via Awake for responsive gameplay.
Explore the idea behind a response point system in a Unity 2D platformer, respawning the player near failed obstacles, deducting a life, and resetting with full lives.
Create a respawn point manager in unity that gathers child respawn points, tracks the current point, and offers methods to update, trigger a respawn, and reset points for level restarts.
Learn to implement a respawn mechanism by wiring an agent died event to a response manager, using design patterns for loosely coupled code and spawn-point testing in Unity.
Create a response helper to call the response manager from the player prefab. Enable level-wide spawning via spawn points and prefabs across levels.
Making games is fun but there is nothing more frustrating than adding new code to create a new game mechanic just to have the old code break. At this point it stops being fun and bug search begin - which honestly is the least fun thing to do when you could instead design a new level for your game. That is why it is so important to learn how to create maintainable and extensible code base for your game. If you search for a solution you will find Design patterns and SOLID principles. If you have every tried to learn design patterns you surely know that it is not intuitive when to use it. Each presents a solution but requires time and additional code to work. Implementing them just for the sake of it is just a waste of time - so when should we use them? The answer is - when adding new features or extending the old ones seems like a lot of work and effort.
In this course you will learn how to use state pattern as a base to create your character controller and how to refactor your code to other design patterns when you can see that adding new feature starts to be "painful" and unintuitive. At the end you will know the way of thinking behind the refactoring process and behind the decision when to use design patterns.
You will learn how to write decoupled classes - meaning that class A doesn't rely on Class B but if they both exist they can communicate witch each other to create our desired game mechanics.
This is an Intermediate course about creating a maintainable and extensible codebase and in effect a full 2d platformer game. You should know your way around Unity and feel comfortable coding in C# using Visual Studio IDE.
You will learn how to:
Create a character that can move and jump and extend it's character controller with new features like: climbing behaviour, attack logic etc.
How to reuse players character controller for enemies
How to create 3 types of enemies as well as a end level boss
How to use factor method pattern to make your code more maintainable
How to use Strategy pattern to implement simple AI system
Specific platformer features that we will implement:
picking up resources
respawn system
adding platforms with one-way collider
creating parallax effect for our level
melee and throwable weapons
and much more!
If for any reason you don't enjoy the course you have 30 days from the purchased date to get your money back - no questions asked.
I hope to see you in the course :)
-Peter