I Made Pong, But YOU'RE The Ball!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay so my other video kind of blew up but i needed another viral video idea how about pong but you're the ball and it's 3d and in first person sounds good right all right let's start then so uh if you somehow don't know how pong works it's basically ping pong or table tennis but in 2d where you control these paddles and hit this ball back and forth until someone eventually loses i've actually already remade pong multiple times so this will be easy right except for the fact that literally every game mechanic will have to work completely differently because well it's not 2d and it's in first person and you're the ball but oh well first i added a capsule collider or as some people like to call it a bean but you don't hear beans around in pong well at least i don't think so so unfortunately i'm sorry i had to sacrifice the bean and replace it with a much more spherical object a sphere because uh i don't know if you know this but that's the shape of a ball next i needed that ball to move so i gave it a rigid body and sure enough it moved but maybe not in the right direction i then slapped on a first person movement script and i could walk around and jump and slide as a ball now while this was pretty cool how exactly did it fit into pong to be honest i hadn't actually thought through how this game was going to work at all and i really didn't know how i was even going to make this 3d but then i thought of my plan instead of keeping the graphics seen in the original game and changing them into 3d because let's be honest they're pretty bad and like what would they even look like in 3d anyway i decided that i was going to add graphics that look like actual table tennis or ping pong so like the ball is on an actual table how crazy is that with my new goal in mind it was time to actually start working to complete that goal so i made these big rectangular prisms i think that's what they're called which acted as a placeholder for the paddles for now the thing is when you ran into them you just stopped and as you probably know in pong the ball is bouncy and instead of stopping when running into walls it bounces back you might think adding this would be pretty simple i mean i could just give the ball a physics material and give it some bounce and it should work right well apparently not while that does work in 2d for some reason the bounce on the physical material works completely differently in 3d meaning i would have to resort to another option i was going to have to code the bouncing myself i found this unity function where you give it a direction and the normal of a plane which is like a vector facing straight up from a plane and it will give you back a new reflected direction very similar to how the bouncing works in pong so i incorporated this into my collision code and it worked perfectly is what i would say but my attempts didn't really work and so i went to my good old friend stack overflow for some very handy code which is now mine and what a surprise the bouncing works how cool all it took was control c and control v it's actually surprisingly fun to just move around and try to conserve your speed and momentum while bouncing back and forth on the paddles and i kind of spent way too long doing just that but i have a game to make so i really need to get cracking now because this game is going to have fancy kind of realistic graphics i need to add some well fancy kind of realistic graphics so because i have very minimal 3d modelling skills i went to my favorite store the asset store and purchased for free a very nice table tennis model set with a table and some paddles i then put it into the game and it looked like a table tennis table because it was one i positioned the paddles in spots so that they looked as if they were playing table tennis and now you could play pong on a real ping pong table with real paddles or at least somewhat real but as you might be able to tell it's actually pretty boring just bouncing onto these stationary paddles and it's quite easy and you can also just fly off into the void so i added some walls to keep you contained and make bouncing much more fun and also made the paddles move i thought it would be cool at first to make the paddles kind of like how the ai moves in pong where it follows the ball and always has a pretty high chance of hitting it i added this and it actually feels really similar to the original pong because it makes it seem like the paddles are hitting the ball and because of the similar bouncing mechanics one thing i noticed when playing around with this was that the player just kept building up more and more speed as long as they were moving and that they could easily just stop moving whenever they wanted to avoid hitting the paddle i spent quite a long time trying to find the solution to this and i tried so many different things until i eventually found two different functions which worked one called mathf.max basically takes in two numbers and returns the highest one and i used it to keep the speed above the minimum to keep the speed under a maximum i used this vector3 clamp function to clamp the speed under the limit after quite a bit of balancing both of these functions used together made for a ball that always stays not too slow or fast okay now to make some paddles that are actually kind of difficult to hit because let's be honest having paddles that automatically move to the ball is a bit too easy so i just made them move left and right regardless of the ball's position and now it's actually pretty fun to play and a good difficulty so yeah now i need a background because not many people like to play ping pong in an endless void at least i think they don't i went back to my favorite store and downloaded an office asset pack and arranged some of the assets in my scene i created a fairly decent backdrop with a desk a lamp and a door and it looks alright now [Music] alright so the game is now functioning but there's no real reason to play it so i need to make a score i just made a number increase every time you hit a paddle different to the last one and displayed that number on some text and it worked with some extra additions like a high score sounds and some prompts to start and restart the game i had finished the game before i show you the finished game i just want to thank you all so much for the insane growth in the last few weeks and all the milestones we've hit like 10 000 subscribers i actually recorded this part a few days before when i was at 5000 and i had to re-record it because of the insane growth it's really crazy and i also want to announce that i've created a patreon so if there's anyone who wants to support me even more than by watching my videos you can do it there all right now for the game okay so as you can see this is the finished game and i mean it looks decent and it's got some pretty fun gameplay and yeah if you ever want to download this there's a link in the description but it might not run very well just warning yeah overall i actually really like this game if you like this video like the video and then go watch my other video where i showcase my first year of learning game development with no experience
Info
Channel: DevBanana
Views: 941,596
Rating: undefined out of 5
Keywords: game devlog, game dev, game jam devlog, i made a game in 24 hours, devlog, devbanana, game development, making a game, unity game engine, unity, unity game development, unity devlog, making a game in unity, dev banana, pong, 3d pong, i made pong in 3d, i made pong but you're the ball, i made pong but youre the ball, pong but you are the ball, first person pong, i made pong in first person, ping pong game
Id: _V_mduJl8FA
Channel Id: undefined
Length: 7min 18sec (438 seconds)
Published: Sat Jul 02 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.