Making PONG in 6 Minutes Unity Tutorial

preview_player
Показать описание
Forgive me friends, I wanted this to be how to make pong in 5 minutes, but it would have been a little too crunched. I think some areas, like the UI score got condensed more than I would have liked, but overall, I think it illustrates the point of how you can make pong really quickly!

Pong is a must make for beginner game developers, regardless of the engine you choose or whether it is in 2D or 3D. In fact, I think most courses use pong as an early homework assignment these days.

I've made (and will continue to) make a variety of Unity Tutorials on this channel, so checkout the tutorial playlist below to keep learning!

✨Want to support the channel?

LIKE the video if this helped you out at all, it helps the channel's visibility and lets me know what I got right!

COMMENT if you have any questions and need help!

➤Don't forget to SUBSCRIBE for all the upcoming content.

Thanks for watching!!

#bmo #unity #tutorial
Рекомендации по теме
Комментарии
Автор

I just spent 6 hours attempting this on my own without YouTube and it was satisfying but to see this guy do it in 6 minutes is... AHHH

wortwortwort
Автор

After watching this tutorial I added "Unity developer" to my resume.

beau
Автор

For anyone doing this now, if the score text is not showing up on the screen even when you have it in your game area, you have to click on "Canvas" in Hierarchy, and change the render mode to "World space", that worked for me at least, scores showed up and everything worked past that point :)

MrKarolex
Автор

Great tutorial, thanks. I am the kind of person who prefers to "get something done quickly" and then expand it rather than studying theory. I started this afternoon with 0 experience with developing anything in Unity and I was able to, following your tutorial, make a simple basic pong game with two "computer controlled" paddles playing against each other (the paddles are simply tracking y coordinate of the ball). Yes, the pace of the video is fast, you gotta stop from time to time to see what exactly and where you have to set up, but it's working. Thank you, good job! :-)

BobeshCZE
Автор

4:01 Ball Script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Ball : MonoBehaviour
{
public float speed;
public Rigidbody2D rb;

// Start is called before the first frame update
void Start()
{
Launch();
}

// Update is called once per frame
void Update()
{

}

private void Launch()
{
float x = Random.Range(0, 2) == 0 ? -1 : 1;
float y = Random.Range(0, 2) == 0 ? -1 : 1;
rb.velocity = new Vector2(speed * x, speed * y);
}
}

YourRobloxian
Автор

At around 4:45. If you're getting an error about the TextMeshProUGUI, you need go to the top of that script and where you see "using UnityEngine;" and the other items, stick "using TMPro;" in there. Should resolve it.
Also at the end if the reset doesn't happen, go to the game manager script, down to the player 1 and player 2 scored sections. Add "ResetPosition();" after the text component parts for both players. It briefly shows up in the video earlier before it disappears, but isn't touched on later.

Sarstan
Автор

I know that the guy making the video goes fast here but try and watch literally every little step that he does, I caught on some stuff that I missed and I got the thing to work completely. Good luck to you all

GWOGaming
Автор

Tried it. Even though you skipped some details was able to fill in most of the parts. Works great. Thanks.

akishtp
Автор

gave up on game dev for a while and am trying smaller projects to get back in the swing of things and this was great!

teebs
Автор

These quick videos are great, but how about extended versions to go more in-depth explaining everything further?

Fernando-G
Автор

Im here after having my brain fried trying to make the next gta game. Now that im disillusioned and learned that i need to learn more before doing that, im now here to learn to make pong

underthecoveragent
Автор

Your script for the paddle movement is fantastic, thank you!

joegracey
Автор

Can confirm This does not take 6 minutes

ScorpV
Автор

I tried to make a game with this tutorial, but then after the text part you skipped most things that a beginner won't know how to do.

pocketglove
Автор

If you're new to C# and wondering what this line (float x = Random.Range(0, 2) == 0 ? -1 : 1;) means, let me help you:
The "?" operator is called ternary conditional operator. It evaluates the conditionn before the "?" and gives results based on it. First is the true, second is the false part.

So that line means: If Random.Range(0, 2) is 0, float x should be -1. If it's not 0 it should be 1.

TheVulpesh
Автор

ok. Ill tell you the truth. Its good for intermediates and beginners alike. Granted you have to put the video on 0.25 speed and listen VERY carefully to in the ned get a working result. Took me two tries. And after a lot of debugging and looking into other ways i just gave up and wathced it again. This time i got it working. Just aheads up for next time. PLEASE dont cut the video so abruptly. It helps a lot if you show where you are clicking and not only commentating. Either way good tutorial. 7/10

tristanlosada
Автор

He doesn't address you need to add using TMPro; at the top of your GameManager script. If you don't, it'll show a CS0246 error in your console.

abdullahabbasi
Автор

Yatta! I did it! Not in six minutes, but I still did it!
More tutorials please!

Lonewolf
Автор

U just made my uni work 10 times easier, thanks💖

Катя-цеф
Автор

you need more fame . i f or real thought you are a million sub channel😂🤝

zamuraisah