Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Easy SDL2 Games in C++
Rating: 3.0 out of 5(8 ratings)
131 students

Easy SDL2 Games in C++

Create simple video games using the Simple Directmedia Layer 2
Created byDion Jackson
Last updated 7/2025
English

What you'll learn

  • Students will learn how to write basic programs using the C++ programming language utilizing the terminal or a IDE compiler.
  • The subsystems of the Simple Directmedia Layer 2 will be explained and a student will have the oppertunity to experiement with the API.
  • A student should be able to create a basic SDL2 application by the end of the course series.
  • A student will be able to manufacture an application with a simple user interface and a game state.
  • C++ progamming features related to Object Oriented Programming.
  • Using the terminal in Linux to compile and build complete projects.

Course content

3 sections109 lectures20h 23m total length
  • Easy SDL2 Games in C++ Trailer7:14

    The following course series has information regarding using each subsystem section of the simple Directmedia Layer 2 for cross-platform development using the C++ programming Language. If you want to learn about using SDL2 this course should provide some basic explanations for coding concepts which could hopefully reduce the rigor of software development.  The following video series will be comprised of 3 sections the first of which will be dealing with the simple Directmedia Layer 2. Then the following section will be an active learning live coding session called Lets Try It! for different related areas of C++ and SDL2 . Finally in the final section there will be actual game programming for game such as : card games, board games, matching games, bug smash game , Frogger , Tetris , RPGs , platformers , Breakout , space shooter game , tank , top down shooter ,snake and a turn based game template which could be used for something else. If you would like to  learn how to make some quick game projects , look no further than Easy SDL2 games in C++.

  • Introduction to SDL254:55

    In the following course overview there will be a deep discussion around the idea of a live coding project using the Simple Directmedia Layer 2 for various applications other than games. The video contains documents sourced declarations and identification for most of the entire SDL2 application programming interface.

    Games such as Pong ,Tic-Tac-Toe ,Tetris,Tank(Space) Shooter, Snake, Breakout ,Bug-Smash, Platformer,Top-Down-Shooter hopefully will be a good motivator for students learning SDL2 that trying to develop skills in C++.

    The Introduction to SDL2 will include areas the regular  subsystems ,data types ,functions , structures ,

    hints, flags,variables,enumerations,classes all contain in the API. I hope you are as excited about creating video games as I am. In this SDL2 course students will learn about each subsystem of the Simple Directmedia Layer 2 as well as some extension libraries.  Students will first Install the system then go over the basics of using the C++ programming language. If you are curious about using a compiler to code your first project or have some experience programming , I hope this video will be useful to you on your future journey as a developer.


  • Game Loop and Window Program40:27

    As a review from the last video C++ Programming will be centered about the event loop then a description of a  basic game loop using the C++ control structures , data types, and operators  and using pointers. Some ideas in this portion of the video will be centered around debugging basic math operations to control the SDL2 Window with logic. Later there will be a template for constructing a complete basic  graphical applications using easy to learn SDL2 Features.

  • User Defined Functions and C++ Basics24:25

    If you are having none math related quetions about functions in C++ this video had  a quick overview of creating an manipulating code for your projects.   C++ Programming  in SDL2 can be much more interesting if there are features to manipulate the Window. If there are question concerning enumerations , animation  and user defined

    functions  this section could be useful for learning how to regulate the frames per second and other task such as swapping variables. There will always be other information concerning declaring multiple variables  and some basic user input structuring schemes. In this section students will learn also be reminded about the event loop and possible structuring for creating a project using the C++ programming language. .

  • Event Handling for User Input1:29:32

    The Simple Directmedia Layer 2 has various Input  support systems for not just only the Keyboard and mouse like input devices but also for gamepads and joysticks and touch devices and much more. Developers can also text to the screen using the extension library called SDL2_TTF  which supports independent font formats which could change the entire look of a project. The video will also talk about mouse motion and click states for those of you familiar with keyboard bounce also applies to many other API like libraries. There will also be information about getters and setters in C++ for future classes .

  • Rendering Pixels and Other Primitives43:27

    There are several ways to make and or manipulate graphics using the Simple Directmedia Layer 2 other than using OpenGL or Vulkan along with the API. There is another SDL2 extension library that supports other primitives called SDL_GFX.  If you choose to program a basic pong game template you could easily construct assets using this library such as drawing the board or any other type of geometric feature of the game. Show game score could be accomplished using other library add-ons with a bit of help from knowledge about the coordinate systems in each API. Also SDL2 supports colors in hexadecimal notation and formats for RGB values to manipulate pixel information which could be useful later for those interested in shader programs.


  • Loading Images from External Files30:05

    If you discovered how easy it could be to start drawing these new images on screen using SDL2. Like C++ and other programming languages the Simple Directmedia Layer 2 has support for reading or streaming information from external file types. In this section students will learn about how to manipulate various input types for event driven style programs where information is loaded after compile time.  Students will get a brief overview of the expansive libraries contained herein the c++ languages such as the fstream file formatting features and how to access information  from  Arrays to Reading in Text Documents and parsing data and searching data base like systems. Some other terms will be discussed like blitting ,rotating ,cropping, scaling and about the sizes of textures .

  • Optimized Surfaces and Sound57:37

    Working with classes and header files could be complicated after a period of time without practice. Manipulating Textures with SDL_gpu and the GPU can help us maintain the Screen Aspect Ratio . Sound effects and music could be added to any type of application other than games using  SDL2_mixer. Games such as Tetris only really need knowledge about arrays and making a quick matrix rotation can be simplified with a C++ style explication and or explanation .


  • Tilemaps and Collision Detection1:10:42

    C++ programming is quite robust and to explore  SDL2 further we will add tilemaps to a possible game. Learning about arrays and reason for function overloading may help us simplify animation the various portions of the program. Orthographic and isometric tilemaps collision detection strategies are similar for 2D games. Using the tiled map editor  or constructing ones own loading class can be simplified using SDL2. Making our own maps

    without tools or constructing basic graphical map editor with the mouse can be accomplished by just using arrays.




  • Error Handling and Memory Management Techniques42:17

    In this section we will discuss a producer consumer methodology for processing memory related events in C++. Also some information about future coding projects  in SDL2 featuring the outline for the BreakOut game . In C++ as well as other similar languages error handling can be down in several ways one of which is the Try catch blocks scene. Other issues such as common error messages and just general memory management

    solution resolution strategies are addressed in this area.


  • OOP Concepts and Constructing Classes2:07:03

    In other simular Live Coding  like Projects students will look at the Top Down Shooter to poutline some object oriented programming concepts. OOP has support for Base Class vs Derived Class ,Spawning Multiples of an object , Virtual Functions , Factories ,Polymorphism ,Singleton Design Patterns, Inheritance vs Friendship Multiple Inheritance, and Abstraction which are not always needed but OK to talk about for later uses.


  • 2 Player Games and Split-Screen1:44:22

    This section will center around the possible in-cooperation of 2 Player games. There will be some information regarding  Online Players using Hosting Server and Client SDL2_net . The Simple directmedia Layer also supports Viewports, Split-screen Cameras ,Multiple Windows ,Threads ,Semaphores  and Locks/Wait  features which may be useful in the construction of a more modern Top Down Shooter like online game engine.


  • Graphical User Interfaces1:02:51

    In the final tutorial section students will be introduced to common Graphical User Interfaces and other tools such as widgets.The SDL2 API also has support for event driven programming functionality. Other system such as KiWi , kiss_SDL, QT GUI, FLTK ,Dear ImGui ,ImGUI_SDL will be discussed. Then finally there will be an

    active review lesson  called Lets Try It were we review some content to saw during the video series.


Requirements

  • There are no other required resources other than access to the internet to download resources and tools and basic digital input devices such as the keyboard and mouse. .
  • A modern computer with a graphics card (GPU) may be required to access higher features of the Simple Directmedia Layer 2 such as manipulating textures or for later 3D development.
  • Free time to practice and conceptualize concepts like in normal classes.
  • Bring your thinking cap and maybe your imagination.
  • Headphones and paper and pen could be useful.

Description

In Easy SDL2 Games in C++ students will mainly learn about the Simple Directmedia Layer 2 and how to structure basic game applications. SDL2 grants access to low level hardware features for users to develop software using this Application Programming Interface. There is also information contain herein about how to program in the C++ programming language which is useful for those new to the software development scene. The course is a description based structuring of projects using SDL2 also information about other similar APIs for use along side the other systems. The course has 12 parts which are centered around the construction of several game projects. In this lengthy course series students will learn about making simple games such as Snake, Tetris , Breakout , Tank, Space Shooter , Platformer , Top Down Shooter and others. Students should have required resources for using a modern programming configuration to be effective in this course. The Simple Directmedia Layer 2 is a lengthy library with many features to explore and learn. SDL2 can also be combined with other programming languages and tools which may be more helpful for those making other varieties of simulations or system based development. Those interested in learning about SDL2 may find something new here.

Who this course is for:

  • Future game developers looking for a fast way to compete using an simple API.
  • College or Graduate Students who want to learn SDL2.
  • Hobbiest who like to learn about video game concepts using the Simple Directmedia Layer.
  • People looking to make simulations for research projects.
  • Anyone new to the C++ programmin Language.
  • Someone serious about learning problem solving and programming. I am not doing alot of coding for you that is for you to discover and explore how to do with the hints I give you.