
Learn c++ basics by building a console snake game, set up a visual studio project, write a main function, use iostream, and practice hello world output and simple input.
Learn how to initialize two integer variables, read input, and display their sum, then use an if statement to output the larger number between A and B.
Explore how the for loop repeats code from a starting value to an ending value, using initialization and i++, with examples from 1 to 5 and 0 to 4.
Initialize a global boolean game over and four void functions—settings, visual, input, and logic—to run a loop that draws the arena and handles input until game over is true.
Set up global variables for player and fruit positions in a 20 by 20 arena, using x and y coordinates, plus a stop state and direction enum to control movement.
Design arena by clearing the console and drawing a 20 by 20 border with hashtags using nested loops for walls, and plan to slow the game to reduce blinky visuals.
Learn to stabilize a console game by fixing missing tiles, slow the game with sleep for 10 seconds, and ensure random works on older compilers while refining arena and sidewalls.
This lecture covers spawning fruit and players in a loop, placing the player at the arena center, and prepping for random fruit placement and movement with an input library.
Learn to handle keyboard input in a C++ game by using a switch to map keys to left, right, up, and down, with a key to terminate the game.
Implement character movement using a switch for left, right, up, and down, updating the x and y coordinates with x minus minus and x plus plus.
Implement logic to eat the fruit when the player's x and y match the fruit’s position, increment the score, and spawn the fruit at new random locations.
Wrap the snake’s x and y coordinates at the screen edges to create wall passing. Introduce tail tracking so the tail follows the head and grows when fruits are eaten.
Implement snake tail logic by tracking previous x and y coordinates for each tail segment and updating the tail with a for loop so it follows as fruits are eaten.
Build the tail visual for a snake game by spawning and eating food, updating tail length, and rendering the tail through coordinates that follow the head’s previous positions.
Finalize the snake game by implementing collision detection: loop through snake segments and set game over when the head matches a segment, using for loops and if statements in C++.
C++ is a general purpose programming language, it can be very difficult and tedious to learn, that is why we will learn it through game development!
We will learn the most important aspects of C++ programming and once we're comfortable enough we will dig deeper and create a snake game using only the power of C++.