This course includes

(updated Jan 2021)

  • 2 hours of on-demand video

  • Downloadable resources and exercises

  • Full lifetime access

  • Access on mobile and desktop

Watch Intro Video

Course Introduction & Learning Outcomes

Is this course for you?

This short course will teach you how to create a basic game loop using the C programming language and the SDL library. To really make the most out of this course, you should be comfortable with the basic concepts of programming (variables, if-else, loops, and functions). The course is taught using a Linux environment, but you can follow along with any modern operating system and the code will work in Linux, Windows, or MacOS.
Free enrollment
Is this course for you?

What you'll learn

This is a short course that will teach you the basics of building a C project and configuring your compiler to work with the SDL library. You will learn how to set up a basic game loop, fix the time step, configure delta time between frames, and end with a simple skeleton of a 2D game that can be used to improve your programming skills.
Free enrollment
What you'll learn
  • Activities and Discussions

    Join our community and get the most of our discussion boards

Course Content

  • 1
    Introduction
    • Introduction and Learning Outcomes
    • A Quick Reflection on Game Engines
  • 2
    Dependencies
    • Project Dependencies
    • Environment Setup
    • Installing Dependencies on Linux
    • Installing Dependencies on MacOS
    • Installing Dependencies on Windows
    • Quiz
    • Choosing a Linux Code Editor
  • 3
    Building Our Project
    • Compiling Our Code With GCC
    • Creating a Makefile
  • 4
    Creating a Window
    • Creating an SDL Window
  • 5
    Handling Keyboard Input
    • Polling SDL Event
    • Quiz
  • 6
    Rendering
    • SDL Rendering
    • Drawing a Rectangle
    • Quiz
  • 7
    Game Update
    • Update Function
    • Fixing Our Time Step
    • Updating as a Function of Delta Time
    • Using a Proper Delay Function
    • Quiz
  • 8
    Proposed Activity
    • Proposed Activity
    • Activity Solution
    • Collision Detection
    • Uncapped Frame Rate
    • SDL Delay Accuracy
  • 9
    Moving Forward
    • Conclusion & Next Steps
    • Copyright & Content Distribution
    • Similar Courses

Instructor

  • Gustavo Pezzi

    Senior Lecturer

    Gustavo Pezzi

    Gustavo teaches computer science and mathematics at BPP University, London. He studies how teaching game programming can help enhance awareness and understanding of basic mathematics and physics. He is also a professional software engineer with more than 10 years of experience, with an industry background in 3D systems, games, systems, databases, and data analysis. His academic path includes institutions such as Pittsburg State University, City University of London, and University of Oxford.

Reviews

See what

  • Fundamentally Awesome!

    John Whipp

    These are the fundamentals that so many other courses all leave out and take for granted. Seriously thanks so much for this!

    These are the fundamentals that so many other courses all leave out and take for granted. Seriously thanks so much for this!

    Read Less
  • Really thorough explanations

    Michaela Adams

    I really appreciated the time you took to show how to get SDL working on a windows machine and fully compiling. I also have been looking for resources that m...

    Read More

    I really appreciated the time you took to show how to get SDL working on a windows machine and fully compiling. I also have been looking for resources that make use of Makefiles and header files etc and I find a lot of tutorials don't bother unless its a huge project. So I really appreciated you using those things right from the beginning. Thanks!

    Read Less
  • I also live for these tutorials!

    Rumbin Lee

    I think that it’s fun watching him code. Everything is taught descriptively with such simplicity which ironically, blows my mind!

    I think that it’s fun watching him code. Everything is taught descriptively with such simplicity which ironically, blows my mind!

    Read Less
  • Wish I had instructors like Gustavo Pezzi when I was in U...

    Bruce Sutherland

    This is the second course I've taken from Gustavo Pezzi (the first one being Fundamentals of 2D Game Engines) and have enjoyed both immensely. I wrote my fir...

    Read More

    This is the second course I've taken from Gustavo Pezzi (the first one being Fundamentals of 2D Game Engines) and have enjoyed both immensely. I wrote my first computer game in 1985, and am now just starting work on my second one (despite having been a professional software developer for most of my adult life). Gustavo's courses are immensely educational, entertaining, and fun, and have rekindled my obsession with writing computer games. Thank you so much, Professor Pezzi!

    Read Less
  • Fantastic Course!

    Nicholas Helish

    Everything was explained clearly and concisely.

    Everything was explained clearly and concisely.

    Read Less
  • These are best game fundamentals courses around!

    Claude Müller

    As usual, top notch educational material that is delivered by a master educator and easy to grasp!

    As usual, top notch educational material that is delivered by a master educator and easy to grasp!

    Read Less