Hi! I haven’t uploaded in a while but am looking to get back into the channel *soon*. Thanks for all the feedback, my apologies for how small the text is in vscode. Will definitely look at changing this next time! My style is going to change to more of a devlog with all code provided via GitHub at the end :)
This was the best tutorial I found, in terms of the final result. Especially the way you set up the yDirection, in that it relates to the bounds of the paddle!
Decided to recreate Pong with extras. I know Unity basics and I’m an experienced developer so didn’t look at any tutorials. Now checking tutorials after finishing basic game and liking those that did much the same as me so that’s a 👍 for this one. Only criticism, if ( isTutorial ) playBackgroundMusic = false;
Just wanted to share my stupidity here lol when I got to the Invoke method part of typing in Invoke("StartBall", 2f); and it wouldn't work meaning the ball never moved. I went back to see if I missed something, and I was like "I literally did this to the tee! So what the fuck is the problem here?" I spent the last three days learning all that I could about the Invoke method and its limits and even coroutines, and a couple minutes ago I watched this video again and realized....I typed in "Startball" instead of "StartBall".......I forgot to capitalize the B....and then the ball moved lmaoo three days to just figure out it was that. Wanted to share that. Great video! My mistake helped me learn more.
I've written the player movement script exactly the same but the movement: isAI: and Movement Speed: are just not showing up as variables. What have I done wrong?
@@reps2564 If you are still working on it change ("vertical") in visual studio code to ("Vertical") also make sure you go to (in the unity editor) edit => project settings => input manager => axes => vertical, and make sure that is is defined as Vertical and also that your "w" and "s" keys are binded hope this helps
Is their a way of implementing a while loop to this so that it ends after the players or the AIs score reaches a certain number. And if there is could I have help with it please as I'm not sure how while loops work in unity. Thankyou in advance.
you could put in if statements when it increases the score (more efficient than loops) and if the player/ai score is over a certain number you can run SceneManager.LoadScene(x); with x being the "name" or scene number. To use this, you'll have to state 'using UnityEngine.SceneManagement;' at the top. Then make 2 new scenes, one with some text saying you won and the other saying you lost, and maybe a replay button. I'm late to this and new to coding so you probably figured out something better already lol
Besides the fact that you went a bit fast, and I got confused a couple times, I've had this issue so many times before, its not detecting the collision
if it's bouncing off the sides, it means that the 'startball' function isn't even triggering. It might be because you used onCollisionEnter instead of onCollision2D, or you might've messed up setting the triggers themselves. if you're talking about the paddles they're changing the speed not the score. vague question tho
@@Reklaw096 in that case it either means you didn't set up the triggers or the ontriggerenter function properly. Double check that they're both set to 2D, that can be an issue
I'm blind like a mole, why didn't you make the code's font bigger 😑 But thank you tho, I'd been searching for this part with the ball going any direction depending on the angle!
@@2010platinumstar At the time, I didn't really understand C#, because I thought I don't really need much knowledge about it because C# and Unity's C# are somewhat different. From then I've finished with learning C#, but I gave up on Unity because of the newest update. So, I would say that my lack of understanding C# did a pretty big part in not knowing what to do, but I can't really say he did a great job on this video.
For some reason whenever I add a collider to my background it ruins the ball movement, but then ball movement is normal without a collider on the background, I don't know what is happening with the interaction between the two
Hi! I haven’t uploaded in a while but am looking to get back into the channel *soon*.
Thanks for all the feedback, my apologies for how small the text is in vscode. Will definitely look at changing this next time!
My style is going to change to more of a devlog with all code provided via GitHub at the end :)
thanks Respected tutor
Hope you come back soon!
@@danthon1267do u know what he used to when he set up the project like a 2d or 3D
Geniunely, taught be so much about those damn voids that I didn't understand at all. great video all-around
This was the best tutorial I found, in terms of the final result. Especially the way you set up the yDirection, in that it relates to the bounds of the paddle!
Ball ❌️
Bull ✅️
Thank You for this tutorial 🙏🏽
I recommend this tutorial! It was a good one (the best so far) I searched for like 2 hours and finally found yours! it helped me a lot THX!
Decided to recreate Pong with extras. I know Unity basics and I’m an experienced developer so didn’t look at any tutorials. Now checking tutorials after finishing basic game and liking those that did much the same as me so that’s a 👍 for this one.
Only criticism, if ( isTutorial ) playBackgroundMusic = false;
Such a good video with best explanation!!! You got a new Subscriber and hope so you will start posting again :)
Thanks man! I’m working on a new video and should be regularly uploading soon!
Thank you so much it took a while to figure out what was going on but I made the game with your help thank you
Amazing video! I followed it and felt like I learned so much, however, the music drove me crazy.
i only have one tip. ctrl mouse wheel in vs. had to break out my magnifying glass.
but great stuff i needed the platform movement for something
Just wanted to share my stupidity here lol when I got to the Invoke method part of typing in Invoke("StartBall", 2f); and it wouldn't work meaning the ball never moved. I went back to see if I missed something, and I was like "I literally did this to the tee! So what the fuck is the problem here?" I spent the last three days learning all that I could about the Invoke method and its limits and even coroutines, and a couple minutes ago I watched this video again and realized....I typed in "Startball" instead of "StartBall".......I forgot to capitalize the B....and then the ball moved lmaoo three days to just figure out it was that. Wanted to share that. Great video! My mistake helped me learn more.
Also, when the ball hits my side, the counter doesnt go up... why?
Congratulations! You got a new subscriber! Now you have 158
I've written the player movement script exactly the same but the movement: isAI: and Movement Speed: are just not showing up as variables. What have I done wrong?
Same happened to me
make the isai and movement speed public!
text doesnt change when i make a goal and the ball doesnt resets sorry for my english im german
its not even letting me import the files (sfm all over again)
What's the background music?
otherside from minecraft
love the minecraft bg music
My player doesnt move when i press any keys did i do something wrong
did you fix it?
@@reps2564 no i gave up especially since my uni switched to unreal engine sorry i cant provided tips
@@reps2564 If you are still working on it
change ("vertical") in visual studio code to ("Vertical")
also make sure you go to (in the unity editor) edit => project settings => input manager => axes => vertical, and make sure that is is defined as Vertical and also that your "w" and "s" keys are binded
hope this helps
@@reps2564 try writing the code again
fixed for me
Is their a way of implementing a while loop to this so that it ends after the players or the AIs score reaches a certain number. And if there is could I have help with it please as I'm not sure how while loops work in unity. Thankyou in advance.
you could put in if statements when it increases the score (more efficient than loops) and if the player/ai score is over a certain number you can run SceneManager.LoadScene(x); with x being the "name" or scene number. To use this, you'll have to state 'using UnityEngine.SceneManagement;' at the top. Then make 2 new scenes, one with some text saying you won and the other saying you lost, and maybe a replay button. I'm late to this and new to coding so you probably figured out something better already lol
Why does the ball stop dead on when it comes in contact with my racket or the wall?
Have you addded the bounce physic to the gameObject?
same here, can you please give the solution
Can I have the ball movement code ?
Thank you so much!!!!!!!😀😀😀
why font so small,i can not see anything
Click on playerscore/ aiscore and make the scale bigger
Womp womp
My ball wont start and I’m not exactly sure why. I have no error in my code but it just won’t work
Make sure u wrote the function name correctly
This tutorial Was awsome Thank you so much
Besides the fact that you went a bit fast, and I got confused a couple times, I've had this issue so many times before, its not detecting the collision
Why can I not move my paddle at all?
make sure vertical is capitalized "Vertical"
Hey, for some reason the "AI" Moves when I do, what did i get wrong here?
I had the same problem, I had to change the gameobject in player controler script to none and leave it only for the AI and then it worked
the ball does not bounce, I have everything the same
Add physics material in ball's collider
@@SPACESOFT_GAMES thnx this was really helpful
It is not doing the scoring part it just bounces off of it
if it's bouncing off the sides, it means that the 'startball' function isn't even triggering. It might be because you used onCollisionEnter instead of onCollision2D, or you might've messed up setting the triggers themselves. if you're talking about the paddles they're changing the speed not the score. vague question tho
@@chumleechumbucket6625 ya sorry it is speeding up by the paddles but when it hits the walls behind the paddles it does not change the score or reset
@@Reklaw096 in that case it either means you didn't set up the triggers or the ontriggerenter function properly. Double check that they're both set to 2D, that can be an issue
@@chumleechumbucket6625 ok thanks I will try to see if that works later
I'm blind like a mole, why didn't you make the code's font bigger 😑
But thank you tho, I'd been searching for this part with the ball going any direction depending on the angle!
4:27
Bro why? Tutotial is good but I can't see any codes? they are very smaii
fullscreen and squinting helps but my eyes hurt now
hi
really bad tutorial. you're going too fast and dont explain half of the things...
This was pretty easy to follow for me. You can rewind if you miss something.
@@2010platinumstar At the time, I didn't really understand C#, because I thought I don't really need much knowledge about it because C# and Unity's C# are somewhat different. From then I've finished with learning C#, but I gave up on Unity because of the newest update. So, I would say that my lack of understanding C# did a pretty big part in not knowing what to do, but I can't really say he did a great job on this video.
For some reason whenever I add a collider to my background it ruins the ball movement, but then ball movement is normal without a collider on the background, I don't know what is happening with the interaction between the two
I tried this , but in game ball doesn't move until I tried to move it by scene what problem is this