
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 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.
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.
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