
Learn to set up a C++ development environment for SDL2: install dev-c++, create a project, and configure SDL2, SDL_image, and SDL_font libraries with compiler and DLL integration.
Initialize the SDL library, create and show an 800x600 window titled Car Racing Game centered on screen, and display it for five seconds using SDL_Delay, then SDL_Quit.
Create an SDL2 renderer for your window, enable accelerated rendering, select the first available driver, validate creation, and prepare textures for the car racing game.
Implement a real-time game loop in SDL that continuously polls events, quits on the close button by setting a quit flag, and updates game objects like cars, road, and score.
Load a road image using the SDL2 image library, create two textures for scrolling, render and present them in a loop with a 60 fps delay.
Center the road between grass on both sides and set a 400-pixel road width; load the grass texture, create two scrolling grass strips and two scrolling road segments that move.
Load the player car texture, center the car at the bottom, and move it left or right with a speed in response to arrow keys, staying on the road.
Display and animate open end cars that move down the road at speed eight pixels, spawning at random x positions on the road using SDL2 textures.
Detect collisions between the player car and opponent cars with checkCollision. Trigger explosion after collision by setting collisionOccurred true, loading explosion texture, and displaying via explosion rect at collision point.
Detects collisions between the player car and the road sides, triggers an explosion image at the collision point, and halts road and opponent movement after impact while preventing player movement.
Add core score functionality by incrementing the score when opponent cars pass the player, init the font library, convert score to string, and render it on the SDL window.
Learn to initialize SDL, create a centered 800x400 window with a shown flag, and set up an accelerated renderer for a dino game in C++ while handling errors.
Implement an event-driven loop that waits for the SDL quit event, exiting only when the user presses the window's cross button, preventing automatic disappearance.
Load the dino image from the sprites folder, create a surface and texture, and render it in an SDL2 window at x 100 and y near the bottom.
Trigger the dino jump with the up arrow or spacebar, applying a negative vertical velocity and gravity to rise and fall within the SDL window coordinate system.
Learn to implement a seamless ground scrolling effect using two textures that move left on the x axis, with SDL textures, surfaces, and the update ground function.
Explore moving obstacles in a dino game, featuring small and big cacti that scroll from right to left, with a cactus class handling update, render, hitbox, and random spawning.
Add potatoes flying at random altitudes, using potato1.png and potato2.png, moving right to left. Spawn them every 3 seconds, load textures, and render at altitude-based y coordinates.
Implement a boolean check_collision function that tests the dino rect against cactus and patera rects to return true on collision, ending the loop and later a game over with replay.
Display the game over text with the SDL font library, loading Arial.ttf at 28 to render game over and press spacebar to replay the game, and halt movement on collision.
Enable spacebar replay after game over by resetting the game, reinitializing cactuses, dino position and velocity, and ground movement for seamless restart.
Explore a complete game built with SDL2, featuring asset loading, font handling, ground scrolling, a jumping dino, random cactus spawns, collision detection, and game over reset.
Initialize SDL and create a centered 800x600 space invader game window with a renderer using SDL2 in C++. Include error handling and a five-second delay to test the window.
Implement an event-driven loop to detect the SDL quit event when the user clicks the window close button, and update a quit flag to terminate the window.
Position the spaceship by setting x and y, centering at x=400 on an 800-pixel window with width 50, load spaceship.png via the stl image library, render and present.
Develop spaceship movement in an SDL2 game by handling left and right arrow keys, updating the ship's x position with speed, and enforcing screen bounds from 0 to 800.
Learn to implement a ten-bullet firing system in a C++ SDL2 spaceship game, including bullet struct, activation, movement upward from the ship center, and on-screen rendering.
This lecture introduces enemies moving downward, with up to ten on screen, loads enemy textures, randomizes spawn positions and speeds, and repositions enemies when they go off-screen.
Learn to detect collision between the spaceship and enemies with a check collision function that uses has_intersection on rects, exits loop to show game over, and respawns enemies after hits.
Define enemy health points and randomize health, speed, and position; detect bullet-enemy collisions, decrement health, deactivate bullets, and respawn enemies, then show game over image.
Implement game over functionality by loading and rendering a game over texture when the spaceship collides with an enemy, while continuing to check other collisions only when not game over.
Press the spacebar to replay the game. Reset the game over flag, respawn enemies at random positions, and place the spaceship and bullets back to their initial mid-screen state.
Learn to initialize SDL, create a window titled Brick Breaker at 800 by 600 centered on screen, and set up a renderer with a five-second display.
Load the ball.bmp image into an SDL surface, convert it to a texture, define a 20x30 rectangle at (20,30), copy to the renderer, and present for five seconds.
Master event handling in SDL by building a loop that keeps the window open until the user presses the cross button, using SDL_PollEvent and SDL_QUIT.
Load a background image as a texture for an SDL window, set a 800 by 600 rect, and render the background before the ball to keep the ball visible.
Move a ball in an SDL window by updating its x and y positions with velocity, render over a background, and prepare for wall collisions that cause bouncing.
Detect ball-wall collisions in an 800 by 600 window, reverse velocity on left, right, top, or bottom bounds, accounting for a 30-pixel ball via a ball collision function.
Load and render a sprite in the SDL2 window, then implement a keyboard-controlled bat that moves with the left and right arrows while staying on screen.
Increase the bat speed and implement outer-part collision detection using ball scaling to bounce the ball by reversing its velocity when the ball hits the bat.
Initialize a 3 by 8 brick grid in SDL2 by loading brick.bmp, defining 80 by 35 bricks, and render them with 10-pixel spacing for collision-based removal when hit.
Demonstrates detecting ball-brick collisions, removing bricks on hit, and reversing the ball’s velocity; implements a boolean ball-brick collision detection function and iterates over bricks to update visibility.
Display a win image when all bricks are broken by tracking deleted bricks, comparing to the total 24 bricks, and rendering the win texture with SDL once they match.
Learn to clean up after a win by presenting the win image for 10 seconds and destroying textures, surfaces, renderer, and window with SDL functions to free memory.
implement a game over when the ball misses the bat and hits the bottom wall, display a game over image for 10 seconds, then quit.
Build a brick-breaker game in SDL2: initialize surfaces and textures, manage 24 bricks in three rows and eight columns, ball and bat movement, wall and brick collisions, and win/lose screens.
Initialize SDL, create a centered 600 by 600 window with SDL window, show it, delay for five seconds, then quit SDL.
Learn to create an SDL renderer to draw textures, shapes, and text in a window, choose a driver and enable GPU-accelerated rendering, with error handling and verification.
Learn to implement a close event handler in SDL2 that quits only when the window close button is pressed, using an event handler function, SDL_PollEvent, and a main loop.
Draw a 3x3 grid in a 600-pixel-wide window using SDL by computing the cell size, then render vertical and horizontal lines and present the frame.
Load circle and cross textures and render them with SDL2. Handle mouse clicks to place marks in a 3x3 grid, track each cell’s owner, and switch between players.
Identify the game winner by checking all rows, columns, and diagonals for a single owner, return that owner, or draw if no winner and the board is full.
Learn to display an SDL2 window in a C++ helicopter game by initializing SDL, creating a centered 600x400 window, showing it, waiting for events, and cleaning up.
Load a helicopter image into an sdl2 window by creating a renderer, loading a surface, creating a texture, and rendering it with render clear, copy, and present.
Implement collision detection between the helicopter and the upper and bottom walls of the SDL2 window. Create a check collision function taking the actor by reference and quitting on collision.
Press the up arrow to move the helicopter up at a set move amount, then release to descend under gravity at a defined gravity amount, implemented with SDL2 keyboard state.
Load and move obstacles in a SDL2 helicopter game by spawning five cacti at random heights with random speeds, moving left to right, respawning offscreen, with collision ending play.
Implement obstacle collision detection for a helicopter in a cpp sdl2 game by adding a check_collision_obstacles function with horizontal and vertical overlap tests, ending the sdl window on collision.
Load and display a game over image in SDL when the helicopter collides with cacti or walls, using a game_over texture and a boolean flag to control rendering.
In this part, the course demonstrates counting and displaying score in a C++ SDL2 helicopter game by incrementing when obstacles pass the helicopter and rendering the score with SDL_ttf fonts.
Apply final explanations to complete a fast-moving helicopter obstacle game in C++ with SDL2 by adding a frame delay, handling input, gravity, collision, scoring, and game over rendering.
This lecture guides creating an SDL2 GUI for a snake game in C++, showing how to initialize SDL, set up a centered 640x40 window with a renderer, and handle input.
Display the snake image in an SDL2 window by loading a 20-pixel snake texture, storing segments in a vector, and rendering each segment on a green background.
Move the snake along x and y by updating direction from arrow keys, defaulting to right, and compute a new head, insert it, and pop the tail with SDL delay.
Implement a boolean function to detect wall collisions by checking the snake head against screen bounds. In the game loop, use this result to quit the SDL window on collision.
Learn to add food to a C++ SDL2 snake game by spawning food at random screen locations, loading a food texture, and growing the snake on collision.
Implement a boolean function to detect snake self-collision by comparing the head with each body segment using x and y coordinates, triggering game over and a game over image.
Implement a game over flow by using a game_over flag, loading the game over texture, and rendering it when the snake collides with walls or itself.
Learn to complete a snake game in c++ using SDL2 by loading textures, handling input, spawning food at random positions, detecting wall and self-collisions, and growing the snake.
Initialize SDL, create a centered 800x600 window titled 'my gaming window', show it, wait a few seconds, then quit SDL.
Create an SDL renderer tied to your window and enable GPU-accelerated rendering to draw images, textures, shapes, and text while managing on-screen object updates.
Implement an SDL event handler to poll quit events. Keep the window open until the close button is pressed, run a game loop to update paddle and ball.
Define paddle width and height, initialize left and right paddles, render them in SDL2 by clearing the screen, drawing filled rects, and presenting each frame while responding to keyboard controls.
Implement paddle movement for left and right paddles with W/S and up/down arrows by reading keyboard state, updating y positions, and clamping to screen bounds, and throttle to 60 fps.
Create and center a 15-pixel ball in the SDL window with x, y, and velocity; update its position, render it, and implement top/bottom wall collisions by reversing y velocity.
Implement collision detection between the ball and left or right paddles using a check_collision function, reversing the ball velocity on impact and reinitializing after exiting the screen.
Reset the ball to its initial position and velocity when it goes off screen, reversing x and randomizing y. Increment and display the score on paddle hits, resetting on miss.
Initialize SDL and create a centered 800 by 600 gaming window, shown immediately, then delay eight seconds before quitting; handle initialization and window creation errors.
Create an SDL renderer to draw shapes on the game window, selecting any available driver and enabling GPU acceleration. Validate the renderer's successful creation before drawing.
Develop a two-player split-screen in SDL2 by implementing an event-driven loop that waits for the window close button, renders two colored player sections, updates per iteration, and cleans up resources.
Initialize the font library in SDL, open a font (e.g., Arial) at 24 pixels, handle failure, render cleanup, and properly quit and free resources after use.
Render text in a SDL2 window by creating a render_text function that converts font and string into a texture, then position and copy it for player labels and scores.
Generate a random value from 1 to 6 on a turn by seeding with time, convert it to string with a string stream, and render it in an SDL2 window.
Build a two-player dice game in c++ with sdl2, triggering a 1-6 random roll on a turn click and updating each player's score in alternating turns.
Implement winning and draw conditions: require both players to reach a century on same number of turns, awarding the win to the higher score or declaring a draw if tied.
In this course you will be able to learn about the Game Development concepts in C++ from absolute scratch up to the level where you guys will be able to make Pro Level Games. We are going to do Game development in C++ using the most powerful C++ Graphical Gaming Library SDL2. SDL2 is a very famous and interactive library for Game development in C++. You are going to cover the very latest concepts of Game development using SDL2. In this course where we will be covering 10 different Games using SDL2 each introducing new and interesting concepts for you to learn.
Each Game is going to help you to learn more and more interesting concepts. At the end of this course, I assure you that you will be able to create a totally new Games of your own requirements and specifications in SDL2. This course covers the latest concepts of SDL2. I would love to hear your feedback as you're in your journey in taking this course.
For this course to start, you don't need anything. You don't even need to have any past experience of C++ or any other programming Language. We have uploaded a C++ Crash Course at the end that will help you gain knowledge of C++ to start on with the Game Development using SDL2. If you already have the basic knowledge of C++ then you can directly go towards Game Development using SDL2 and learn all the interesting concepts we have got for you here in this course.
You might encounter problems while taking this course. For this, you can directly message me and I will try my best to get back to you as soon as possible. You can ask your question(s) in Q/A Section where there will be many students who are already taking this course will answer you questions. When you done with any Game, I would definitely recommend you to upload your code and your experience with other students. You can also add more and more functionalities to your game as this is one of the prime objective of this course that you should be able to add your own functionalities in your project(game).
I wish you best of Luck with this course.