I Tried Learning C++ in ONE week?!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
i'm going to attempt to learn c plus programming in only one week will i succeed [Applause] [Music] let's find out shall we [Music] [Applause] whoa slow down before we get started let me set the goals and explain the context my goal this week is to make a game using only code and no game engine to help me through this journey i'll be learning everything using youtube videos and a c plus udemy course oh and i wanted to be clear i have never touched a line of code in my life so i'm really starting from scratch the goal of day one was to learn the basics so i opened this four hour long video and started going through this big chunk of theory and holy glowing poop this was pretty tough to swallow i was never a fan of theory i'd rather learn through doing but in this case i felt like it was better to have a global understanding of what tools are at my disposal and in what context i should use these tools at the end of this first day i was however capable of writing my very first program oh yeah i'm officially a programmer now i obviously then proceeded of writing my second program do it anyways apart from the two mini programs i wrote uh this day was pretty boring i have a very basic understanding how this all works and i think it's time to start working with actual code and apply the stuff i learned in a game dev context to help me through this i use this c fundamentals for game programming course i found this course on udemy and we'll be talking more about this course later on in the video anyways to this course i managed to learn quite a few things first i learned how to display a window and then i display the same window but in red yeah i know red window crazy stuff right finally i proceeded to make a window with an actual object inside a ball because we all know it wouldn't be a floki video without some juicy so i added movement to the ball and i added a mean evil cube that would kill the ball if you touch it and this was where i started realizing how much i will actually miss the glorious unreal engine because if you're writing all the code yourself some simple stuff can become pure pain for example let's compare how to code collisions in visual code to how easy it is to add them in unreal engine so in visual code you would create an invisible rectangle around your ball then you use the coordinates of the top line the bottom line the left line and the right line of the set rectangles subtract them with the perpendicular counterparts to define a point where they cross each other and that's what gives you the location of the different corners of your rectangle once you have the location of all corners you do the same for the other object that you want to check the collision with and finally you create an if statement where if one of the rectangles enters any space of the other rectangle it will execute something like for example writing game over on the screen and now in unreal engine yeah fair to say a game engine definitely makes your life way easier today was probably one of the biggest steps in my c plus journey and that's because i actually started to code and dive into some of the math that comes with it i understood how some things work that i used all the time in unreal engine without ever thinking twice about it it felt very enlightening on day three i started with the actual game that i wanted to create this week i was going to recreate the chrome browser dino game that everyone knows and loves so i found a sprite of the actual dino i then added that sprite to my code and made it appear in the window shortly after i made him able to jump and then came the animation part having had a bad experience with animation a few weeks back i really wasn't excited about this part but it turns out in 2d it's actually stupidly easy so 2d game animations are like a flip you basically just cycle through a bunch of sprites fast enough to make it seem like it's moving and since i already had all the needed sprites for my dino i got my character animated in less than an hour so now we have our very own little jumping dino but as we all know dinos are extinct so let's add something to make our little dino cease to exist and what better object to make stuff cease to exist than my trusty axe liver and voila we have a rotating axe that flies towards our dino however now we have to create a collision event because otherwise the actress flies through our mr dyno and i mean this should be fairly easy since i already did it with my circle and cube game yeah it it didn't work don't ask me why i have no idea it just froze the whole program as soon as i tried to run it with collisions but you know what that's going to be a problem for another time because i'm off to bed [Music] yeah day 4 was pretty boring from a storytelling perspective because i took the entire day to clean up my code i did this by simply making my overall code shorter by introducing arrays for loops and even made some of my own functions this on one hand made my code nicer to look at but it also made it possible for me to tweak my game by simply changing a few line of codes [Music] let me get this straight so you know where the mistake is you know what the mistake is so technically you could fix the mistake that makes sense to me so fix the mistake no anyways don't worry i won't bore you with all the boring details day 5 was big on day 5 the game actually came together so first i managed to get my collisions working even if i have absolutely no idea what i did to make it work i changed some random stuff and it just seemed to kind of start working but i mean i'll take it and thanks to the now working collisions we finally have a game over condition i also introduced a collectible to the game i present to you the yellow watermelon along with this collectible i made a point system for every second you survive you get one point and if you manage to get the yellow watermelon you get 10 points now even though the game is coming together nicely there's still one big problem i don't have a destroy and respawn system for now the items fly by and even if you don't see them anymore they're still moving forever to the left and since i was pretty spoiled from using unreal engine i thought i would simply despawn the axe once it moves out of the screen and spawn in a new axe somewhere up ahead however it turns out that making a spawn and despawn system is way more complicated than in a game engine although this wasn't that big of a problem because of the one thing i really like about coding there is always multiple solutions to a problem so instead of making a spawning and despawning system i would just simply move the ready existing axe to the front of the scene as soon as it reaches the end of the window kind of teleporting the already existing axe back to the front i did the same with the yellow watermelon and voila we have an endlessly looping game so yeah the game works but we still have quite a lot to do there's still some stuff lacking for starters the game doesn't get harder over time it's just the same axe flying at the same speed towards the same dino and that's boring so to spice things up i made it so that the longer you're alive the more axes fly towards you and the faster everything gets i also made it so that the axes get moved back to the front by a random distance to make it less repetitive and more interesting i also added some sound using our favorite sight just and the final spice to the mix i added another way to dodge the axis and that is the duck ability no not that kind of duck this kind of duck now i will admit that i was a bit lazy with this one instead of making a new collision size for the duck ability i instead just gave the character a half a second immunity frame when he uses this ability now before we move on to the final day i wanted to talk to you about something i know that a lot of you are already in the learning process or wish to learn game dev or programming but getting started with programming can often end up being insanely boring but this doesn't have to be the course i followed was actually really fun it was very dynamic where you learn by doing skipping the need for the four hours of boring theory i went through on day one you simply start the course and get straight to the learning by doing part if you wish to get this course there will be an affiliate link down below in the description right next to my discord server the game is basically done the only thing it now needs is a little bit of um shininess because again it wouldn't be a floki video without some [Music] so yeah i added a glow to the character added a red dangerous glow to the excess and also added a yellow golden glow to the yellow watermelons i also made a menu a moving background but something was still missing something vital something that would make this game addicting i'm talking about loot boxes i of course meant to say music music was the right answer and so i found and added a pixeled version of one of the best songs ever created and now we have this addictive masterpiece by the way if you want to know how i made my very first game a 3d game in only seven days click here [Music] come on do it click
Info
Channel: Floky
Views: 15,635
Rating: undefined out of 5
Keywords: coding, c++ game, c++ programming, game dev, game development, floky, Indie game dev, Game dev challenge, 3d games, unity, unity3d, devlog, learning how to make games, Unity, Game Development, Game Development Challenge, Unity3D, Unity Game Development, Memes, indie game devlog, Unreal engine 5, Indie Game Development, game devlog, game developer, indie game developer, learn python programming, Powerlearning C++ Programming, programming, learn to code, what is coding, C#
Id: y27SHJh706A
Channel Id: undefined
Length: 10min 50sec (650 seconds)
Published: Sun Jun 19 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.