Best tutorial I could find on Unity 2D Platformer! All other tutorial often go too fast or is using too many outside resources that is hard to follow. This one is just simple and perfect to get started! Thank you!
I've tried so many times to make games using both Unity and Unreal Engine, but never did anything with it, however this video was very simple and useful, and I absolutely loved it. Thank you so much for making this.
i like the fact that you explain what the code does, not just doing it. the other tutorials i see from other youtubers, are like just copy what i do even if you dont know what this does
There's a bit of a flaw in the way you coded your jumping. Whenever I'm against an object, even when there's no ground beneath it, I'm able to jump. Sometimes I hit an edge at such an angle that it disables my jump when I land, thinking that I'm still against it. Any idea how to fix that?
Thanks! That game was made around 3 years ago now, it was my first ever game, so doesn’t have a lot of the typical functionality a good game should. It saves ur progress by loading you into the level and saving the level ur in via an int :)
I am using the new unity version and I think you will need to set Rigidbody2D in PlayerMovement script to public 'cause set it to private will make Rigidbody2D cannot work
I thought that brackeys is the best tutorial to watch but after 2 minutes I didn't know what's going on... but you just keep it very simple and you explain everything very well keep it up. I'm going On the next tutorial so bye 👋
if you dont want to jump iwht space but instead vertical, just but in the quoations "Vertical" then go to edit -> project settings -> input manager -> axes -> vertical , then make sure there is nothing in the negative and alt negative
Basically just hit the keys and hit the head to the wall until something happens on the screen and repeat the same over and over again. Just be patient with yourself, try different methods of learning etc. After watching tutorials try to build something using the concept you just learned, seek help and reminders after you stuck a dead end, try by yourself first. Slow by slow kick the bar higher and repeat the same learning process. Try to learn the logic behind the code concepts, but for sure you don't have to know everything. Eventually you will learn something. Building small projects again and again and then adding always some new and difficult to the project
Thank you for this tutorial itll help me learn the basics of unity I'm going to try and make other games with the code that I learned and further improve my coding skills
I set my speed to private and didn't declare it I just assigned it there and then. I prefer it that way. Works great if anyone else wants to use it 'private float speed = 10f;'
Thank you for this tutorial, Blakey, you really helped me out here. It was straight to the point and clear so I could copy everything neatly. You are a lifesaver.
At 15:53 in the video, my recommendation is to not change “collision” to “other” as when I changed it to “other” my jumping did not perform correctly. But keeping it as “collision” made it work perfectly
You explicated the code really good and like @Orpheus YW said the other tutorials of how to make a platformer on unity2D uses other sources or they are just simply not finished definitely subscribing
hello to if your rigidbody and your monobehaviour arent working youve got to go to edit in the editor>prefrences>External tools and then set external script editor to the current code program your using in my case VS(Visual Studio)
Hi I used this tutorial and when I implemented the movement part it gave me a syntax error and wouldn't show up in components tried one I found on stack over flow and didn't work either can you help? btw I was using unity 2020.3.
There's a bug in this game" if you add a wall with a collider and everything, if you hold the AD keys when touching it, your character will stick to the wall.
fist game ive made I wasn’t able to figure out the pause menue bc my buttons just wont work but thats fine. I had so many probloms with coding that took me hours to figure out but finally did it. geat tut !
WTF THANK YOU THANK YOU THANK YOU!!!! I WAS LOOKING FOR A SUCH A GOOD VIDEO LIKE THIS AND I FOUND IT!! YOU HELPED ME SO MUCH!!!! Edit: at the void command lines I stuck bc this shows error here (help)
22:37 BIG REMINDER to be mindful of how you're naming things! I was scratching my head why the "End" didn't load Scene2/level2 on collision. Welp! Named the Scene "Level 2", and upon putting the code, I put "Level2", sooo that space had me running loops for a good 3 minutes lol. I always forget how literal, word-by-word scripting/coding is...
Hi loved the tutorial. Helped me a lot and maked me take my first steps. But, thee movement and jumping scriptt didn't work to me. Do you know a script for only jumping? I would really apriciate it. Thanks for all!!!
How to make smooth camera movement: public GameObject target; public int smoothing; void Update() { float x_diff = (target.transform.position.x - transform.position.x) / smoothing; float y_diff = (target.transform.position.y - transform.position.y) / smoothing; transform.position += new Vector3(x_diff, y_diff, -10); } feel free to copy
Amazing! Still works in 2022 in current version! One question though, How would I add more levels? When I try to use a duplicate of the script with level 3 instead of 2 it tells me that the original script also uses that code with the same parameters so the duplicate cant be used, meaning I can only have 2 levels. Would it be possible to make it so the script says: if(scene == level2) { SceneManager.LoadScene("Level3); } I know the if statement is incorrect but is there a way around this? Also the public void quit and resume doesnt work because in the newer versions it doesnt clasify that as a click. You can close the menu by pressing escape again though
@@TrendyBanana you can use the same script, doesn’t need to be duplicated. You need to add a public string at the top of your script, and pass that string into the brackets of your LoadScene function Then in the Unity editor just type in the name of the scene you want to load into the string input field Regarding the buttons, that should still work, make sure to double check your code and that you’ve passed the functions into the button component
For anyone who can get the menu to work, but clicking the resume button does nothing, the text needs to be the child object of the button. Dont know why thats the case but i figured it out
Microsoft Doesn't let me download Visual Studio so I have to go on a Third-Party Website to Download it Edit: Also I use an Older Version of Unity And have no idea Where Compiler Errors are.
ERROR : Assets\PlayerMovement.cs(43,18): error CS0111: Type 'PlayerMovement' already defines a member called 'OnCollisionEnter2D' with the same parameter types
Everything works amazingly, even figured out what i was doing wrong with the buttons except that everything ABOVE resume selects resume, but if im anywhere below it highlights quit. Is there a way to make it to where the only place you can select is the actual buttons and not anywhere around them?
Any one who’s sees this he was most likely using a different colour scheme so it may not be the same, and if the code doesn’t work check for capitals and semicolons and mistakes the smallest mistake can cause problems and the whole thing won’t run
For some reason, my duck (which is what I used as the sprite) will spin randomly (when it goes over a corner too far or something similar, it will rotate around and it is quite annoying if I'm honest)
I have a ton of scripts and assets related to this and my other tutorials that can help you out on my Patreon:
www.patreon.com/BlakeyGames
How many levels this game have?
i cant make the player jump
@@Magic8112 me too
Best tutorial I could find on Unity 2D Platformer! All other tutorial often go too fast or is using too many outside resources that is hard to follow. This one is just simple and perfect to get started! Thank you!
no probs!
I've tried so many times to make games using both Unity and Unreal Engine, but never did anything with it, however this video was very simple and useful, and I absolutely loved it. Thank you so much for making this.
i like the fact that you explain what the code does, not just doing it. the other tutorials i see from other youtubers, are like just copy what i do even if you dont know what this does
Best tutorial I've found so far. No frills or pointless gabbing, just straight to the point, concise good information. Cheers mate
WOW!! AMAZING!!!! This channel is TOO underrated, this was easy to understand and super simple to follow!
Very good video! This is the best 2d platformer tutorial that I've found because most tutorials start with a tile-set which makes it hard to follow.
glad to hear that!
I was so flipping happy when I did the movement script tears came, thank you so much 🙏
Glad to hear that my friend!
its been 5 years since i used unity this was the refresher as simple as it was i really needed it .Good jump !!
Great Tutorial. One of the best tutorial I found. It’s not to fast or to slow. Just the correct speed.👍
The code to stop jumping mid air won't work
Ye i have the same problem
My problem is This Compiler Error thing. I have no idea Where that is
BRO! I have been looking around for a tutorial like this for AGES! thank you so much!
There's a bit of a flaw in the way you coded your jumping. Whenever I'm against an object, even when there's no ground beneath it, I'm able to jump. Sometimes I hit an edge at such an angle that it disables my jump when I land, thinking that I'm still against it. Any idea how to fix that?
try to give a extra space in your collision compared to the sprite
yeah i saw this but in a way i kind of like it
Best tutorial on 2D plattformer imo. I will make my own 2D game eventually, thanks for your help.
Glad to hear it dude!
@@bblakeyyy thanks! I played your invisible platform game and loved it so much!!! But how does it save your progress? And how do I go back to menu?
Thanks! That game was made around 3 years ago now, it was my first ever game, so doesn’t have a lot of the typical functionality a good game should.
It saves ur progress by loading you into the level and saving the level ur in via an int :)
@@bblakeyyy Great thanks
Great video just finished half now and going going to finish it tomorrow
i have watched dozens of videos, to ensure that i am able to find the proper videos to help me. and yous are perfect. you deserve much more.
This video makes all the concepts so much easier even a year later. Keep it up! 👍
Love your tutorials dude. Thank you so much for all the help and keep up the amazing work!
I am using the new unity version and I think you will need to set Rigidbody2D in PlayerMovement script to public 'cause set it to private will make Rigidbody2D cannot work
Ty bro I wondered why speed didn’t show up even though it was public😅
ur a legend with me it didnt work but thank you smh
I thought that brackeys is the best tutorial to watch but after 2 minutes I didn't know what's going on... but you just keep it very simple and you explain everything very well keep it up. I'm going On the next tutorial so bye 👋
Great tutorial! Watched until the end and everything worked. I am new to C# but you explained the code very well. Keep it up, homie.
if you dont want to jump iwht space but instead vertical, just but in the quoations "Vertical"
then go to edit -> project settings -> input manager -> axes -> vertical , then make sure there is nothing in the negative and alt negative
Basically just hit the keys and hit the head to the wall until something happens on the screen and repeat the same over and over again. Just be patient with yourself, try different methods of learning etc. After watching tutorials try to build something using the concept you just learned, seek help and reminders after you stuck a dead end, try by yourself first. Slow by slow kick the bar higher and repeat the same learning process. Try to learn the logic behind the code concepts, but for sure you don't have to know everything. Eventually you will learn something. Building small projects again and again and then adding always some new and difficult to the project
Good advice!
@@bblakeyyy Thanks for your help! By the way, background music did not get unnoticed, great and relaxing atmosphere 🎼
this is the most helpful video that i've watched for unity. great explanations thank you!
amazing channel! i cant believe this quality only has 2k subs definitely subbed
I have been trying to figure out player controls forever now thank you so much!
Thank You! It was my first time I started to make the games and you really helped me to get in! God bless you, bro!
This and GMKT are the best Unity Tuts on UA-cam frfr
Excellent video! Simple enough to understand, but not TOO simple. Thanks.
Brilliant. A whole, simple game. All I need to do now is swap out for sprites and duplicate assets everywhere. Thank ewe Bblakeyyy
Thank you for this tutorial itll help me learn the basics of unity I'm going to try and make other games with the code that I learned and further improve my coding skills
This video was so good I'd buy you a free cup of coffee at the Jiffy Lube waiting room.
That is so randomly specific
This did also leave me baffled but appreciated nonetheless
I set my speed to private and didn't declare it I just assigned it there and then. I prefer it that way. Works great if anyone else wants to use it 'private float speed = 10f;'
Yup
Thank you for this tutorial, Blakey, you really helped me out here. It was straight to the point and clear so I could copy everything neatly. You are a lifesaver.
You spell it bblakeyyy
It’s alright, I actually go by Blakey on discord and stuff so works out :)
@@bblakeyyy ok
underrated channel +1 like
Deserves a sub with all notifications best one out of the 13 tutorial video and easy!
Edit:I did not expect to get a heart but thank you:)
this was a amazing tutorial it is my first game and since you explained the code good. i can now do some stuff on my own, Thank you!
So Clear, Useful, Easy to learn and advanced at the same time
All the thanks to you^^
At 15:53 in the video, my recommendation is to not change “collision” to “other” as when I changed it to “other” my jumping did not perform correctly. But keeping it as “collision” made it work perfectly
Your issue was most likely elsewhere, changing to other should not cause issues
Legend! Simple and straightforward, with good explanations!
glad to hear it! subscribe to the second channel for more tutorials!
You explicated the code really good and like @Orpheus YW said the other tutorials of how to make a platformer on unity2D uses other sources or they are just simply not finished
definitely subscribing
This was an amazing and extremely helpful video, thank you and keep up the good work
My first time i make a game in unity thanks bro
hello to if your rigidbody and your monobehaviour arent working youve got to go to edit in the editor>prefrences>External tools and then set external script editor to the current code program your using in my case VS(Visual Studio)
THANK YOU SO MUCH! THIS TUTORIAL IS SUPER EASY!!! I CAN FINALLY MAKE 2D GAMES!
using for 2d animation but this has been a livesaver thank you!
I finished ! it's a very good tutorial Thank you !
👍🏻
you got a new subscriber very clear and beginner friendly
Hey! I have a tutorial channel dedicated to just tutorials now! It can be found on my featured channels list!
Hi I used this tutorial and when I implemented the movement part it gave me a syntax error and wouldn't show up in components tried one I found on stack over flow and didn't work either can you help? btw I was using unity 2020.3.
@@notmelloyello Mind providing the script? Copy and paste it here
9:45
how do i add double jumping
OMg this is amazing tutorial, please upload more tutorial i really learned new things but i am having some issue
It doesn’t let me grab the rigidbody2D.. can someone help? I don’t know what I did wrong. I’m using vs2022 btw
Amazing, simple and well explained.
The best video ever , thanks 😃
Very friendly to mobile viewers. Good and fast tutorial to start create your first platformer game.
Friendly to PC viewers too! Really simple to follow, and I'm watching this on a computer!
There's a bug in this game" if you add a wall with a collider and everything, if you hold the AD keys when touching it, your character will stick to the wall.
Thanks for the tutorial! Your tutorial helped a lot.
fist game ive made I wasn’t able to figure out the pause menue bc my buttons just wont work but thats fine. I had so many probloms with coding that took me hours to figure out but finally did it. geat tut !
Thanks, I found this very good. Not simple, but that’s not your fault. It was the computer.
WTF THANK YOU THANK YOU THANK YOU!!!! I WAS LOOKING FOR A SUCH A GOOD VIDEO LIKE THIS AND I FOUND IT!! YOU HELPED ME SO MUCH!!!! Edit: at the void command lines I stuck bc this shows error here (help)
22:37 BIG REMINDER to be mindful of how you're naming things! I was scratching my head why the "End" didn't load Scene2/level2 on collision. Welp! Named the Scene "Level 2", and upon putting the code, I put "Level2", sooo that space had me running loops for a good 3 minutes lol. I always forget how literal, word-by-word scripting/coding is...
Best tutorial out there !
Finally, a good tutorial.
Great tutorial! Thank you!
Thanks for the tutorial! I enjoyed it.
i copied the code for moving but it don't work
You also have to adjust the things and stuff
ty 4 the tutorial, very informative
You deserve a sub i made my own it it was perfect thank you very much i even made my own character and a floor
Every legend started here... o7 o7 o7
Thank you Man! continue with your dream ;)
Deserves more views 100%
Thank you!
Hi loved the tutorial. Helped me a lot and maked me take my first steps. But, thee movement and jumping scriptt didn't work to me. Do you know a script for only jumping? I would really apriciate it. Thanks for all!!!
Just loved it. Was fun.
wonderful tutorial
glad to hear it!
God this was so helpful, thanks a million
Great Tutorial♥
Thanks, I learned a lot
no prob :)
Yes I fixed my problem. Anyway thank you for this great tutorial
Great tutorial!
How to make smooth camera movement:
public GameObject target;
public int smoothing;
void Update()
{
float x_diff = (target.transform.position.x - transform.position.x) / smoothing;
float y_diff = (target.transform.position.y - transform.position.y) / smoothing;
transform.position += new Vector3(x_diff, y_diff, -10);
}
feel free to copy
Great vid mann
the best tutorial ever!!!! thank you.
welcome!
Amazing! Still works in 2022 in current version!
One question though, How would I add more levels? When I try to use a duplicate of the script with level 3 instead of 2 it tells me that the original script also uses that code with the same parameters so the duplicate cant be used, meaning I can only have 2 levels. Would it be possible to make it so the script says:
if(scene == level2)
{
SceneManager.LoadScene("Level3);
}
I know the if statement is incorrect but is there a way around this?
Also the public void quit and resume doesnt work because in the newer versions it doesnt clasify that as a click. You can close the menu by pressing escape again though
Glad to hear!
@@bblakeyyy Hey sorry just edited my comment do you have any idea on how to help with my problems?
@@TrendyBanana you can use the same script, doesn’t need to be duplicated.
You need to add a public string at the top of your script, and pass that string into the brackets of your LoadScene function
Then in the Unity editor just type in the name of the scene you want to load into the string input field
Regarding the buttons, that should still work, make sure to double check your code and that you’ve passed the functions into the button component
@@bblakeyyy would that be public string and then the variable? And would I put that variable inside the parentheses in the scene loader sentance?
Public string sceneName
SceneManager.LoadScene(sceneName)
the jump doesn't work
great video thanks man!
New sub tysm this helped a lot bro
The variables didn't show up in the PlayerMovement Component..
For anyone who can get the menu to work, but clicking the resume button does nothing, the text needs to be the child object of the button. Dont know why thats the case but i figured it out
tyy
ty
Thanks dude
i have problem with a code of basic movement it doesnt show me the speed please help :(
Microsoft Doesn't let me download Visual Studio so I have to go on a Third-Party Website to Download it
Edit: Also I use an Older Version of Unity And have no idea Where Compiler Errors are.
Nice Tutorial
Great job you're making the engineers like me 😉
ERROR :
Assets\PlayerMovement.cs(43,18): error CS0111: Type 'PlayerMovement' already defines a member called 'OnCollisionEnter2D' with the same parameter types
Thanks now i can make my first game
Everything works amazingly, even figured out what i was doing wrong with the buttons except that everything ABOVE resume selects resume, but if im anywhere below it highlights quit. Is there a way to make it to where the only place you can select is the actual buttons and not anywhere around them?
the first script doesn't work for me, a lot of the text isn't highlighted
Same for me did u solve the problem yet ?
@@Chubzdoomer thank you
@@Chubzdoomer You are a literal GOD my friend!!!!! Thank you from the bottom of my heart
Its not working for me too
Any one who’s sees this he was most likely using a different colour scheme so it may not be the same, and if the code doesn’t work check for capitals and semicolons and mistakes the smallest mistake can cause problems and the whole thing won’t run
this was so helpful thank you! you should make one for sapphire
simply thanks.
For some reason, my duck (which is what I used as the sprite) will spin randomly (when it goes over a corner too far or something similar, it will rotate around and it is quite annoying if I'm honest)
@thinic1Just got to working on the game now, that fixed it, thanks for the help!
really simple, but i learned lot of things
I did the movement script EXACTLY how you did it, but there is no speed variable in the component.
Please comment why.
I can’t comment why if you’ve said you’ve done it exactly how I’ve done it yet it doesn’t work
@@bblakeyyy oh damn...
im having the same issue as well