
Please watch the first couple minutes of this episode even if you have a ton of experience with Unity; I go over valuable house keeping suggestions that will make you a more successful student.
After the first few minutes I'll go over a step-by-step guide on how to download and install Unity using their available free version for hobbyists; if you have Unity installed and are ready to start learning how it works, you can skip to episode 2 after the first few minutes.
If you have some experience and understand how to code/work within the Unity editor, then go ahead and skip to section 2 after the first few minutes of this episode.
A description of how each of the standard windows in Unity work and how we will use them throughout the series; at the end I will show you how I setup the windows for what I consider the most optimal workflow.
In depth discussion of what a 'Gameobject' is, what the 'Transform' component does, and how these are the building blocks that make up everything for a game within Unity.
Discussion on how gameobjects react with each other when they are parent/siblings/children of each other; using the simple geometric shapes Unity provides, we will build a level following these principles and test what we've learned so far at the end with a challenge.
I explain how a computer reads code through an analogy to help with initial comprehension on how to code and what it actually does.
We'll go over a blank script in Unity and explain how the computer processes the information in the script to execute commands.
We'll break the ice with writing code by going slowly going over simple movement and then explain what the different colors in the text represent.
I'll go over line by line what the logic in the 'Movement' script means in laymen's terms.
I'll go over how to API (application programming interface) documentation to help speed up learning unfamiliar topics and jump start using new methods/scripts.
We'll learn about the 'bool' keyword and how to use true/false logic to change the color of the sphere when it is in motion.
We'll learn about the difference between a 'float' value and an 'int' value as well as how we can control logic when the sphere enters inside a collider.
We'll setup UI to display the values of 'Time Left' and 'Score' as well as discuss how we can save the top score through 'PlayerPrefs'.
We'll discuss how to place the pickup cube randomly within the level using Vectors as well as add a spotlight to the cube to make it more visible within the level.
We'll discuss how to setup a particle system and I'll very briefly go over a few features of the system to put together an effect for the pickup.
We'll discuss how to close up the gameplay loop with interactable UI that will respond to button clicks to start the game, retry when it is finished, or quit the application all together; we will also 'build' the game so you can play it outside of Unity.
We will design a very basic testing character and lay the foundation to build a code architecture that can be expanded and modulated to allow more complex movement methods be more easily managed.
We will handle basic movement and discuss how to run code through an 'else' statement as well as how to feed a method certain information it will need in order to come up with the requested solution.
We will be able to flip the character to a leftward facing direction when moving left, as well as have the character's speed increase when a button we will define is held.
We will talk about how we can manage when the player should be allowed to perform a basic jump.
We will solve for allowing multiple jumps in the air based on the limit you set, and not allow to perform a jump in the air if the player is falling before performing the first jump.
We'll prevent the player from performing a higher jump when rapidly pressing jump button if jumps allowed are more than 1, and limit the speed in which the player can fall off a tall ledge.
Allow the player jump to perform the full jump when button held, and perform a smaller jump if tapped.
We will import a character that we can use as a player, then I will describe the rigging process, how to setup bones and connect the different sprite parts to make the character.
We will setup the IKs (Inverse Kinematics) for the character to make controlling the different limbs and bones much easier.
We will discuss how to use animation tools to create fluid animations using 'keyframes' and 'tweening'.
We will discuss how to use the 'Animator' component to trigger the different animations and control what animations should be playing when.
We will discuss how a blend tree can more smoothly and easily transition between two similar animations based on certain values.
We will code and animate a new ability that will slow the player's falling speed when the ability is active.
We will discuss what a coroutine is, how to use it, and code the crouching ability.
We will go over how to animate the crouch and when to trigger the crouching state.
We will discuss how we can create a quick dash ability and have it also pass through certain layers when active.
We will discuss how to animate the dash ability as well as how to change a 'CapsuleCollider2D' direction through code.
We will code the features needed to perform a wall slide and then jump from the wall while wall sliding.
We will animate the wall slide and discuss how can properly trigger the animation and have the character facing the correct way between wall sliding and not wall sliding.
We will be re-writing the input into one singular script and refactor our solution to move input detection from each individual script into this new 'InputManager' script.
We will discuss what the difference between a list and an array, as well as get some practice by making a list and array of names and have the console window print a specified value.
We will discuss the benefits of using an object pooling system to instantiate projectiles into the scene.
We will start building up the 'Weapon' script which will contain all the data for a weapon inventory as well as placing projectiles into the correct position and rotation.
We will discuss how we can use the 'Weapon' script to have the projectiles position and rotation match them with the gun.
We will discuss how can have the projectiles moving in forward direction when shot, but the gun barrel isn't positioned in front of the player.
We will setup new IKs to have the gun arm and other arm snap to a firing stance when weapon used so that the animations we already have can be used while the new IKs handle placing the gun.
We will have both the arms positioned correctly and the projectiles firing straight forward in front of the player when weapon is fired.
We will take a quick break from dense code and discuss how we can add comments to the scripts themselves to note what certain methods or variables do, as well as add inspector tips so that we can leave a note on how certain components work in the inspector window, or have quick notes pop up when mouse is hovering over certain variables or methods in the inspector window.
We will discuss how we can have the player aim in 8 directions and have the arms as well as projectiles position and rotate correctly.
We will discuss how to have the player aim at the closest object to them that contains a tag of 'Target'.
We will discuss how we can expand the logic in the scriptable object of the projectile to include options that would allow for automatic firing.
We will add different pooling types to allow the projectiles to add more to pool if limit is reached, or reset some of the projectiles already on screen to instantiate a new one.
We will discuss how we can add different weapon types to the weapon script and how we can switch between the different weapons.
We will get started on creating a grappling hook system that will let the projectile connect with certain layers and have the player then rotate around that object and launch off when releasing the weapon fired button.
We will finish up everything needed for the grappling hook.
We will first write out some scripts to lay the foundation for better managing the data outside of the player and then write out code that will setup parameters for the camera so it can smoothly follow the player and present more of what is in front of the player regardless of direction.
We will finish having the camera follow the player through a 'Lerp' method and then discuss a bug that is in the dash script that will force the player back to the position they were in prior to dashing if when they finish the dash there is a platform above preventing them from exiting dash.
We will start a script that will act as the foundation for all the different types of platforms that have any kind of behavior to them.
Using the 'PlatformManager' script we wrote last episode, we will create two different types of falling platforms and discuss how 'enums' work as a data type.
We will discuss how we can have the player jump up from the bottom of a platform, fall through if they are standing on top, or do both depending on the enum we chose as the platform.
We will discuss how we can create a ladder that will let the player go up and down vertically while inside the ladder collider as well as stand on top of it just like a one way platform and then fall through it if you want to go down.
We will lay the foundation for moving platforms and code the needed logic for three different types of moving platforms that will follow a path differently depending on which is selected.
We will discuss how we can setup tools for our 'MovingPlatforms' script that will allow us to create paths much easier and have better control of how the path looks.
We will discuss 'Area Effectors' and how we can extend the 'Rigidbody2D' component to use different types of effectors to achieve different types of physics calculations.
We will setup the camera to restrict its movement so it can only move within the level bounds and not have the viewport show anything outside of the level bounds.
We will discuss how to have the player spawn into the scene at the correct locations rather than have the player placed into the scene through the hierarchy window.
We will discuss how we can have the player instantiate into the scene facing the direction they were last in.
We will discuss how to have the player correctly instantiate into the scene if there are multiple points of entry.
We will create a door that will be able to load the next scene when the player crosses the door threshold after shooting it.
We will create a screen that fades to black when the player loads a scene to have smoother transitions in between loads.
We will discuss how to create levels that can easily be scaled down into a mini map.
We will discuss how to create multiple cameras in a scene to display different things as well as how we can start to build a world map from the scalable rooms we discussed last episode.
We will create an object that can act as a 'Player Indicator' for the mini map and later the world map
We will discuss how we can create other points of interests that can show up on the mini map such as a door or collectible.
We will discuss how to have the player indicator icon move in the mini map when the player is moving as well.
We will discuss how we can have the mini map camera move within the world map and clamp inside the room that it is supposed to be displaying.
We will setup the UI for the big map as well as input to turn the map on when a button is pressed.
We will finish setting everything up for an interactive big map that will pause the game when it's open and allow you to move around the world map to see where else you haven't explored.
We'll take the time to discuss first how a system like this can work and then code everything we would need to have the individual squares for the fog of war to disappear when touched by the player indicator square, but also have that data persist so it remembers which fog of war squares have already been found.
We'll complete everything for the fog of war system and setup everything within the Unity editor to make sure the script we wrote last episode can accurately hide the world map behind the fog of war squares.
We will lay the foundation for enemy AI and create the parent scripts that will contain popular variables that can be inherited by the children scripts, and setup very basic forward movement.
We will solve to make sure the enemy can turn around when they run into certain layers as well as have the enemy not only move leftwards now, but spawn into the scene facing left if you would want them to.
We will discuss raycasts and how we can use them to have the enemy turnaround when there is a gap in the floor in the same way they would turn around if there was a wall in front of them.
We will continue exploring raycasts to have the enemy rotate their position so that can walk around the outside perimeter of a platform and cling to the platform as if there is a magnet on the bottom of the enemy keeping it attached to the platform.
We will get started on coding everything we will need to have the enemy turn around on the inside perimeter of a platform.
We will finish up this movement type and be able to properly have the enemy rotate around any platform, whether on the outside or inside perimeter.
We will create a leap frog style jumping system for the enemy so that after a set amount of time they perform a small jump.
We will create a flying movement type to allow the enemy to float as well as setup two different player locator types which will trigger the enemy to follow in the direction of the player if the player is within the detector's range.
We will discuss how to create a melee attack for the enemy including animating the different frames in which the attack would occur as well as hit detection with the player.
Set up enemy projectile attacks in Unity by creating an enemy weapon with a dedicated projectile prefab, expanding the object pool, and implementing aiming, spawning, and burst firing logic.
We will go over everything to deal damage with the melee weapon from the enemy and setup an invulnerability time period where the player can't take damage after being hit.
We will discuss how we can damage based on the layers certain projectiles pass through and also setup a system that would handle random drops based on percentage drop value when an enemy dies.
We will turn the prefabs we made last episode into a new type of scriptable object that will act as item pickup, so when the player enters the colliders of these items, the item is consumed and the player receives health based on how much that item gives.
We will discuss how we can use UI tools to create a health bar that will accurately represent how much heath points the player currently has against the max health points value.
We will write out the logic needed to have a pickup activate a movement ability and have that ability persist after picking it up between game plays.
We will add some additional parameters that should happen when player receives damage including a knock back force, slow down of time, and also setup a system that warps the player back to an appropriate place based on last place that was safe to stand of a specific place if the out of bounds is setup that way.
We will go over everything needed to manage a player death including making a death animation, load the game back to an appropriate spot, and have a game over screen appear.
We will setup more robust UI that will offer different options when paused rather than just display the big map.
We will create a scene that would act as the opening title screen and create the UI that would act as the scene; we will also code out most of the features for the opening scene including the slot system for saving and loading.
We will wrap up the entire series with any loose ends we have with the save load system and making sure everything between the different slots has the right data written into them, as well as create a checkpoint prefab that will save the game and player position.
Most of what is discussed in this video is covered when we code out the jump, but I added some logic to better refine the jump and make it less floaty; use this video to supplement what we already wrote for the jump and you should recognize a lot of the code.
A new feature that allows the player to grab ledges, hang from them, and then climb on top of the ledge or drop off while hanging.
Refactor health and melee attack scripts by moving logic from the player health script into a parent health script and introducing a character manager, with updates shared via GitHub.
Hi! I'm Brent, I also go by I_Am_Err00r, and thanks so much for taking a look at my first course, "Metroidvania Toolkit"; I run a solo game development company Error Free Games, am currently in development making a Metroidvania style action platformer, and wanted to share some of the knowledge I have acquired in making this popular style of genre with the rest of the game dev community.
This course is for anyone who is interested in learning the ins and outs of how to create a 2D action platformer from scratch and we will be creating everything from the ground up; throughout the entire series I will take the time to explain and provide insight on how I go about coming up with solutions and we will be building up the solution from nothing which will make understanding complicated theories with code architecture and maintenance easier to comprehend for those who are new.
In this course, I will provide solutions for the following popular features:
Horizontal Movement
Jumping and Double/Multi-Jumping
Wall Sliding/Wall Jumping
Crouching
Dash/Dodge Roll
Grappling Hook
Object Pooling/Weapon Projectile System
Weapon Inventory
Scene/Room Management
Camera Movement
Mini Map/World Map
Save/Load System
Character Ability Acquisition
Enemy AI
Random Drops
Player/Enemy Health
Data Persistency within Unity
If you're new to coding, game design, or Unity, then the initial section I provide will get you up to speed and quickly teach you the most basic ideas behind coding as well as how to work within Unity; by the end of the initial section you will have a good understanding of what the different windows in the Unity editor do, as well as an understanding of the most basic data types that are foundational for all coding languages; before we wrap up the initial section, I will show you how to 'build' a game and play it as an application on your computer outside of Unity.
If you have some experience coding but struggle writing your own solutions, the rest of the series focuses specifically on how to build an entire Metroidvania style action platformer with over 80 episodes teaching you how to organically come up with solutions using the tools available with Unity out of the box; I will teach code architecture and how to maintain multiple different classes depending on what scripts are communicating with each other, and because we will build this from the ground up, this approach to teaching gives you a behind the curtains look on how these games are built and the why behind more complicated theories rather than just the how.
If you are an experienced programmer, this course will save you a ton of valuable time; depending on your experience level and rate of pay per hour, this course probably costs less than half an hour of your going rate, and will definitely get you in the right direction faster on some of the more complicated solutions.
Regardless of your skill level, this course will give you a head start on creating your very own Metroidvania style game!