I hope you took away lots from this video. Let me know below! PS. Check out my Android Game called Quiz of Knowledge. I am sure you are going to like it. bit.ly/QuizOfKnowledge
Wow! I just wanted to say THANK YOU for making these Raylib tutorials. You are excellent at describing WHY we write the code (the most crucial aspect of learning), both while you code but also before we start to code when you break down what we are gonna do. Sometimes I loose interest in a tutorial when the person is not explaining and or has a pedagogical way of explaining. But I've been glued to your Raylib videos! Please don't stop doing Raylib tutorials, you are the best I've seen on RU-vid regarding c++ game programming (and I really mean it)!!
I just finished school in programming. It was 18 months. I learned c#, kotlin, html, css, js (node, express), sql, mongodb but i always wanted to learm C and C++ because I want to pursue a career in the gaming world as a developer. Throughout the education, i had to use stack overflow and chatgpt to help me with projects( i know i shouldnt depend on chatgpt) because i couldnt understand the books and my teacher (it was an online class). You are the only one so far that explains every code and why its written that way (function, class, etc). I cant thank you enough!!!
I really like the way you break everything down, it really helps with understanding what's going on. I hope you will continue to make more contents. Thank you so much!
Thank you for such a fantastic tutorial. I have taught myself python and found you via your pong pygame video. I spent time a couple of years ago trying to teach myself C++. This tutorial has now whetted my appetite to try and continue this journey. I look forward to what you post in the future.
Glad to hear that you found the tutorial helpful and that it has inspired you to continue learning programming! Learning by building games can definitely be a fun and rewarding way to learn a new programming language. By the way, I'm currently working on a new video tutorial for creating a Snake game in C++, which I think you might find interesting. Stay tuned for that, and let me know if you have any questions or need any help along the way!
Hey man, I wanted to thank you for this tutorial, I've been learning a lot with it! I'm definitely looking at you snake tutorial next! As well, this type of tutorial motivates me more, in becoming a c++ dev!
You can do it. Watch the snake game tutorial, next the Tetris game tutorial, and next the Space Invaders tutorial and you will able to build simple 2d games on your own.
Incredible tutorial! I just started programming and chose c++ as my first language. Ive done many tutorials even another pong video but it was convoluted and didnt explain what the code did or how to break it down into small problems. Thank you so much for this knowledge! On to Snake now!
Amazing Tutorial! Thank you for making it! this tutorial only needs to set a winning max score and sounds when the ball collides with the paddles and walls and when either side scores a point.
Let me just point out that in the beginning you show 1 big thing broken down into 9 smaller things to showcase the divide & concquer method. Let me also say that the video is made up of 9 parts of actual coding. :D Satisfying.
Hey Nick I'm really excited for the next tutorial as this one is very well explained and I understood it easily. Keep up the good work (Επίσης είμαι και εγώ Έλληνας :))
Hey, thanks for the comment! I am really excited for the next video as well! It will be my best so far! Γεια σου πατρίδα, αν φτιάξεις κάτι καλό να μου το στείλεις να το δω!
Couple of things, you really should make the member variables private and have appropriate setters/getters, in addition, the naming of the variables should be more descriptive, x can refer to many things, position_x or positionX would be an appropriate name.
Thanks very much this is one of the best tutorials for beginners about both raylib and oop abilities in c++ , thank you a lot sir💙 But just a small question , do you need any extra extentions to run this on vs code? (Execpt the c++ extension of course) And using codeblocks will do the same work right?
Thank you for a great tutorial! One question though, and my question might be off but, delta time was not used for the movement of the ball nor the movement of the paddles. Is this because you know that your computer will be able to run the pong game at 60 FPS at all times? If you were to make the game available for anyone, would you then use delta time for the movement?
Yes, since this is a super simple game, very computer can run it fast enough. This makes things easy. If I remove the fps limit, my computer can run the game at 5000 fps. Check the latest video on my channel for more info.
Fantastico tutorial,es tan bueno que hasta yo que no se ingles he podido seguirlo sin problemas.Sigue haciendo mas video de raylib que son muy buenos. No se si te molesta que publique en español pero me es mas comodo que usar el traductor de google,pero si hay algun problema puedo usar el traductor.
¡Muchas gracias por tus palabras! Me alegra saber que pudiste seguir el tutorial a pesar de no hablar inglés. Continuaré haciendo más videos sobre raylib y trataré de hacerlos lo más claros y fáciles de entender posible. ¡Gracias por seguirme!
@@programmingwithnick Podrias en proximos videos,hacer un juego con dos niveles y ver como se puede pasar de un nivel a otro.Y tambien me gustaria saber como pausar el juego
Hi Nick, loved your tutorial videos. I want to ask, is there a way to make all of these game projects without needing to delete the main.cpp source code and rewrite it all and instead make a new file and write the code there? Thank you in advanced!
for some reason whenever i run the program the ball keeps hitting an invis wall at x being 781 i have no clue what the reason could be because to me it looks like i did everything like the video showed
This is terrific!!! I'm 90% into it and just have the players paddle moving inside the screen, however I seem to have TWO player paddles as one does move up and down, and another is stationary in the middle position???? Can't find the code issue causing this? Thanks!!
class Player { public: float x , y; float speed; float height, width; KeyboardKey key_up, key_down; Rectangle rec = {x, y, width, height}; void draw() { DrawRectangle(x, y, width, height, mainTheme[3]); } void update() { if (IsKeyDown(key_up)) { if (y > 10) // moving only if its within the field { y -= speed; } } if (IsKeyDown(key_down)) { if (y + height < display_height - 10) { y += speed; } } } }; class Computer : public Player{ public: void update(float ball_y, float ball_x) { if ((ball_y < y + height/2 && ball_x > display_width/2) || (ball_x > display_width/4.5 && ball_x < display_width/2.6)) // extra condition for more interactive bot { if (y > 10) // moving only if its within the field { y -= speed; } } if ((ball_y > y + height/2 && ball_x > display_width/2)|| (ball_x > 20 && ball_x < display_width/5)) { if (y + height < display_height - 10) { y += speed; } } } };
ball is moving back and forth on x axis in very small distance when i add circle rect collision code, it works file if i comment it, any idea what light be wrong?
Thanks a lot :) one question ... there is a weird edge case for the collision, where the ball gets stuck in the paddle and is thrown back and forth. It happens when you catch the ball with the edge of the paddle. Is there a way around this ? Looked in documentation and web but wasnt able to find a solution
@@programmingwithnick hello I just completed creating the whole game, now I decided to create something more and male a menu screen which has start and exit buttons, so i came across raygui i wanted to ask how should I link raygui in the starter raylib template folder structure taken from git
You explain it really good, but I have one question. What if I want to send someone my .exe file to see the game? Do they have to install raylib? Can i make it automated?
You can decrease the cpu speed variable, increase the ball.speed variable or alter the AI algrotithm to move only when the ball is its part of the screen for example. There are many ways to achieve it.
because code gets executed from top to bottom, logically it makes more sense to update the position before drawing the ball on the screen again, right? :)
Thank you very much for your comment and the nice words. I am glad that you liked the video and the structure. I don't use social media, they distract me from the work, and believe me producing videos like this require a huge amount of time. If you want to see updates from me on the projects I am building check my community tab here on RU-vid.