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
    • Representing Boolean Values in C
  • 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 programmer with several years of experience in the computing industry. His academic path includes institutions such as Pittsburg State University, City University of London, and University of Oxford.