Learn How to Make a 2D Platformer in Unity 2022 - FULL GAMEDEV COURSE!

preview_player
Показать описание
Learn how to make a platformer game from scratch in Unity 2022 with combo attacks, hit knockback, two enemy types, physics collision, and much more.

➣ Downloadable Assets, Video Courses, and Other Places to Follow Me

◢ Chris Recommends ◥

00:00:00 - Project Setup
00:05:58 - Installing Art Packs
00:14:22 - Unity Packages Setup
00:17:39 - Basic Background
00:23:00 - Player Walk Left & Right
00:43:22 - Cinemachine Camera
00:46:52 - Parallax Effect
00:55:32 - Animations - Walk, Idle, Run, and Flip Direction
01:23:13 - Animation Strings List
01:26:47 - Ground Tileset
01:41:24 - Ground / Air States
02:14:58 - Player Attack Animation
02:29:29 - Knight Enemy
02:52:13 - Enemy AI States
03:14:53 - Damageable Component
03:32:11 - Hit Colliders
04:15:28 - Knight Improvements
04:30:14 - Player Health UI Manager & On Hit Event
04:52:23 - Health Pickup
05:04:12 - Multiple Attacks Combo for Player
05:20:35 - Projectile Attacks
05:42:57 - FlyingEye Enemy Type #2
06:28:52 - Aerial Sword Attacks
06:41:20 - Export the Game and Exit Game Action (ESC Key)
06:48:55 - Music and Sound
07:05:37 - UI Health Bar and Final Project Fixes
Рекомендации по теме
Комментарии
Автор

If you run into any problems with collision checking (like the knight getting stuck in the wall when it moves too fast), try putting Collision Detection Mode on the Rigidbody2D to continuous mode. This makes the physics check for collisions more often and helps with those kinds of problems.

ChrisTutorialsYT
Автор

10 seconds into the video and I already see the huge amount of effort put into this. Mad respect for you, please keep up the good work!

reemnourali
Автор

Thank you so much! I've been putting off starting to learn how to make video games for so long because it all seemed so daunting, and I didn't know where to start. This helps immensely!

EchoNoctua
Автор

This one comprehensive tutorial was literally the answer to all of my problems. I had done some of the UnityLearn badges (which I highly recommend for a true beginner) but was still confused. Thank you so much for your time and effort in making this video! It's very much appreciated from a struggling student.

ronanstark
Автор

Thanks to you I landed my job in the industry. God bless you Chris.

qetqetqtzccvqdsioeiq
Автор

Absolutely awesome video, Chris! Thanks a lot for all your hard work making it!

BrickCube
Автор

Just found this video and it is absolutely amazing, thank you for this I'm a beginner and I can't wait to get stuck in. If you are looking to make another series, I would love to see a Turn-Based RPG course, that would be pretty cool. Anyway, thanks again dude!

Khoura
Автор

just now completed this series thank you sp much it helps me alot as a beginner i wish you could back to unity thanks for all your hard work to teach us

RetroGaming-colm
Автор

if your idle animation quickly flashes while ur changing direction, go to the player_walk to player_idle transition and set transition duration to 0.1 and interruption source to next state. Do the same with the player_run to player_idle transition.

TTeamaxx
Автор

Thank you Chris, it helps me so much learning Unity

ZhangYiHeng-essb
Автор

OFFICIALLY WRAPPED THIS UP!!! THANK YOU SO

bemtheman
Автор

1:43:55 was this a mistaken cut? You suddenly switch gears from adding the RigidBody2D component and adding a FixedUpdate method to starting the TouchingDirections script from scratch.

I am also finding this section quite hard to understand. You've suddenly introduced a lot of terms I've never seen, or at least not in this context.

Jack_______oh
Автор

I never used properties bc I never found them useful...until this vid, 1:00:00 in. Not sure why other vids did not show the actually usefullness of them but now I see. Thank you.

leedavis
Автор

Watched every second, thank you so much for helping me level up 😎

NotaSWE
Автор

Bruh, I respect, salute you for this tremendous effort and covering everything all together in one video/series. I will take a leap of faith, (create a copy of my game first) and delete all my previous scripts and follow this a to z! Best of luck to me!! Onwards!!

Jeea
Автор

This tutorial is great! I plan on using it for the foundation for any 2d platformer I work on while I am learning Unity.

In case anyone runs into an issue with their knight flipping incorrectly or walking off the edge after setting up the cliff detection, make sure you have your WalkableDirection set to {Right, Left} and not {Left, Right} and to be extra safe set _walkDirection to WalkableDirection.Right when you initialize it. I spent hours trying to figure out why my knight would walk off the cliff backwards or double turn when hitting the first wall. If you don't set the default it will default to the first value in the enum, and for me that was Left, and I was moving right, so the first time I switched directions, it kept moving me in the same direction, causing weird behavior

mychallipson
Автор

If anyone is wondering why the parallax is working backwards(meaning the farthest background moves the fastest) the reason is because when we enabled the cinemachine asset it initially starts in the negative Z direction causing the farthest background to actually be the closest to the camera. The solution is to find Cinemachine in the hierarchy and set the Rotation Y to 180. Because the camera is flipped everything is now flipped as well. Go to your player sprite renderer and click the Flip in the X direction to flip your player. Now your player velocity is in the opposite direction so to fix this go into your Player Controller Script and find "rb.velocity". Set "rb.velocity" to "new Vector2(moveInput.x * (CurrentMoveSpeed * -1), rb.velocity.y);". From there adjust your backgrounds and everything should work like normal :)

jorgeroas
Автор

Ma boi, I really am thankful for the effort! Very good explanations, very detailed.

Can you make video about quests/trading system? Or maybe some improved movements, like dashing, wall jumping, double dashing?

randymarsh
Автор

How do you set up your Visual Studio to get such detailed autocomplete suggestions? My VS autocomplete is not as powerful as yours. Please help. :(

PixelBard
Автор

I think your Parallax section should be reworked a bit. It's easy to follow until you start setting the BG's Z values. When you do that, you're looking at the back of the scene. Notice how the player is facing to the right, but once you start showing the view and changing the background Z values, you've now flipped everything around and the player sprite is facing to the left? I believe this is the source of the confusion in the comments around the parallax effect not working. The viewers have probably had the sprite facing to the right still since that's what they're familiar with in your tutorial until now. When they move the BG objects further behind the player, it will be increasing the Z values. However, since you've flipped the scene, when you move the BG objects further behind the player, it will be decreasing the Z values. The ParallaxEffect script you've coded works when the Z values are negative to represent being further away from the player, but to the viewer this would show up as closer if they modify the values directly and don't use the movement tool to move them behind the player. If they use the movement tool and have the scene facing the opposite of yours (which is how it has been shown until now), then they will get an incorrect parallax movement, which has the BGs that should be closer to the player moving faster.


You can fix the parallax movement by adding a negative onto the parallaxFactor to reverse the movement you have:
float parallaxFactor => / clippingPlane;

I'm new to Unity, so I'm not sure what the standard is on if Z values being positive or negative should mean they're further off the screen. Is there even a standard? I guess it could just be left the the developer's own preferences.

Museko