
Begin your journey in Unity with a beginner's guide to completing a 2D platformer in C sharp, covering setup, Discord community support, and reference project materials.
Import the Unity package into the assets folder to bring in art, audio, and fonts for the project. Discover royalty-free Pixel Frog assets and free asset packs.
Set up a new 2D scene in Unity with platforms and a player, using sprites and a parent‑child arrangement, then adjust the main camera size for a practical view.
Apply Rigidbody 2D and colliders to a Unity character, adjust capsule and box colliders, and tune gravity scale, collision detection, and interpolation to keep the player upright and grounded.
Add a jump force and apply it to the player's rigidbody when the jump button is pressed down, updating the y velocity while preserving the x velocity.
Introduce a run speed and active speed for your 2D platformer, with active speed defaulting to move speed. Hold left shift to switch from move speed to run speed.
Refactor duplicate jump logic into a custom void function called jump, then call it from update to improve maintainability and prepare for future features like sounds or particle effects.
Set up the Unity animator to switch between idle, run, jump, and fall using speed, is grounded, and y speed, with no exit time and instant transitions.
Create and integrate a double jump animation in Unity, using a boolean to activate during the second jump and reset on landing.
Learn to constrain a 2d platformer camera by freezing vertical or horizontal movement with public booleans, storing the starting position, and updating the transform to keep x or y fixed.
Visualize the clamp area in the editor by drawing a cyan box with min and max points using on draw gizmos, aiding testing and platform placement.
Create a rectangular tile map, add a tile map collider 2D and a composite collider, set the rigid body to kinematic, and assign the ground layer for accurate physics.
Save the test level, remove stray squares, block edges with tiles, paint walkable surfaces, and then brighten the camera background with a blue color for a more standout look.
Discover how to create repeating background in a Unity 2D platformer by using a tree line mover script that repositions objects when they exceed a max distance from the camera.
Implement spikes as danger with a box collider 2D set as a trigger; use on trigger enter 2D and a player tag to damage and deactivate the player.
Attach a player health controller to manage current and max health, initializing current health to max. Expose a public damagePlayer function and call it to reduce health when hitting spikes.
Deactivate the player when health reaches zero via the player health controller, clamp health to zero, and set the game object active false as a temporary solution before checkpoints.
Implement a health UI by setting up a Unity UI canvas, event system, and anchor rules, and display ten heart icons in the top-left corner to reflect health.
Create a singleton UI controller to show player health as heart icons, updating display via health input and a for loop to enable or disable each heart.
Enable a grace period after damage with an invincibility length and a countdown in update using Time.deltaTime; damage only applies when the counter reaches zero.
Add a player_knockback animation and an is knocking back trigger to knock back from any state on damage, using backward velocity and half jump force via the health controller.
Learn to stop player control on damage using a knockback counter, apply directional knockback velocity, and refine hit animations with transition timing to create responsive damage feedback.
Fix the double jump bug by replacing the is double jumping boolean with a do double jump trigger in the animator, and update transitions to use the trigger.
Fixes a jittery parallax background movement by synchronizing background updates with camera motion using a static singleton and a dedicated move background function, with null checks for levels without parallax.
Add health by implementing an add health method that increases current health up to max, updates the display, and tests with an editor-only H key.
Create a health pickup in Unity by adding circle collider 2D as a trigger, animate a heart, heal the player via health controller on entry, and destroy the pickup afterward.
Prevent wasting health pickups by collecting only when current health is not equal to max health, using a Unity C# guard in the health controller.
Create a prefab for the health pickup effect, store it in assets, and instantiate copies into the scene with proper position and rotation to spawn the effect on pickup.
Build and test a full health pickup in Unity by creating a prefab with a trigger collider, assigning a health pickup script and effect, and restoring max health.
Set up a checkpoint system to respawn at multiple spots by creating a checkpoint object with an inactive, activating, and active flag state, controlled by a flag active bool.
activate the checkpoint when the player enters a trigger, using a checkpoint script that tracks isActive and updates the animator flag to ensure only one checkpoint is active.
Implement a checkpoint manager that auto-detects checkpoints, deactivates all others when a new checkpoint activates, and tracks the active checkpoint for reliable respawns.
Create a life controller to manage player lives and respawn at the active checkpoint, initializing the respawn position to the player's start and restoring full health.
Add a two-second respawn delay using a coroutine in the life controller to deactivate the player, wait, then reposition at the previous checkpoint, improving clarity and game feel.
Implement a kill plane below the level with a trigger box collider 2D and use the life controller to instantly respawn the player, resetting velocity to zero.
Display lives in the UI of a Unity 2D platformer with the lives image and a Text Mesh Pro counter, using Futile Pro as a TMP asset with an outline.
Create a full-screen game over UI in Unity for a 2D platformer, featuring a game over text and restart and main menu buttons as a reusable prefab with sprite-swap visuals.
Activate the game over screen on player death and restart the level by reloading the current scene with a restart function connected to the restart button.
Reuse the health pickup effect to create death and respawn visuals in a Unity 2D platformer. The life controller spawns them at the player's position, using quaternion identity for rotation.
Implement an extra life system by using a collectible threshold, for example 100; when reached, subtract the threshold, grant a life, and update the life display.
Move an enemy in a Unity 2D platformer with patrol points and a patrol script to travel between points. Use time.deltaTime to keep movement speed consistent across frame rates.
Learn to build a Unity 2D enemy that moves between patrol points using vector3.distance and checks proximity. Wrap the index to zero when the end is reached to prevent errors.
Implement a wait-at-points mechanic for a 2d platformer enemy in Unity, using time at points and a wait counter to pause at each waypoint before moving on.
Configure the enemy's animator to switch between idle and move using an isMoving bool, with no exit time and no transition duration, and flip the sprite for patrol direction.
Defeat enemies by stomping on them with a trigger box collider that destroys the enemy on trigger enter, then bounce the player with a public jump for extra mobility.
Add a one-time enemy death animation in Unity by flashing white on hit, triggering a defeated trigger, disabling damage, waiting to destroy, and stopping movement.
Learn how to create your very own platformer game using Unity and C#, an industry-standard program used by many large gaming studios and indie developers across the world.
In this course you won’t just be learning programming concepts, but tying these concepts to real game development uses. You will have access to a course forum where you can discuss the topics covered in the course as well as the next steps to take once the course is complete.
This course has been designed to be easily understandable to everyone, so whether you’re a complete beginner, an artist looking to expand their game development range or a programmer interested in understanding game design, this course will help you gain a greater understanding of development.
At the end of this course you will have developed the ability to create such game elements as:
Coding with c#, building from the basics up
A character with full movement, running, jumping & double-jumping capabilites
Collectibles such as fruit & extra health
Parallaxing background effects
moving & flying enemies
Level Mechanics like Spikes, moving platforms, crushing blocks & more
A checkpoint system with respawning and extra lives
Full user Interface with interactive menus
Creating levels with tilemaps
Full health & damage system with player knockback
Transitioning through multiple levels
A unique and challenging boss battle
A complete music and sound effects system
And much more!
The course also includes a complete version of the final project to use for your own reference to ensure everything in your game works as it should!
Start learning today and let me help you become a game developer!