Create a Game Loop using C and SDL

Learn to create a game loop from scratch using the C programming language and SDL
Free tutorial
Rating: 4.6 out of 5 (414 ratings)
8,724 students
1hr 57min of on-demand video
English [Auto]

C Programming Language
Game Loop


  • Basic concepts of programming (variables, conditionals, loops, functions)
  • Be comfortable with the basics of using the command-line


The more technology advances, and the more we add frameworks to abstract low-level details of the machine, the less we understand how computers really tick.

This course is a trip back to the fundamentals of game programming. We will dissect and discuss one super important element of any game application...

The game loop.

To understand the ideas behind writing a working game loop, we will learn the basics of the C programming language and use a library called SDL to render elements in the display.

We will learn together how to:

  • Write a basic C program and compile it using the GCC compiler

  • Install SDL and any other dependencies

  • Use SDL to create and open a basic window in your operating system

  • Control the time step of your game loop

  • Update game objects as a function of delta time

This course has no real pre-requisites.

Of course, you should have a working knowledge of how to use your computer, download files, install programs and copy files around your operating system.

But you should know the basics concepts of programming, such as variables, conditionals, loops, and functions. That will help you get the most out of it.

The code we will write works for Windows, macOS, and Linux. But be aware that I will be using Linux during the videos.

Who this course is for:

  • Programmers that want to learn C and SDL
  • Developers who want to learn what a game loop is


University Lecturer and co-founder of Pikuma.com
Gustavo Pezzi
  • 4.7 Instructor Rating
  • 4,283 Reviews
  • 28,865 Students
  • 4 Courses


My name is Gustavo Pezzi, and I'm a university lecturer in London, UK.

I teach fundamentals of computer science, low-level programming, and mathematics at Pikuma.

My academic path includes institutions such as Pittsburg State University, City University of London, and University of Oxford.

I also have some useful scars from 15+ years of industry experience with 3D systems and software programming.

But after all is said and done, I'm just a guy who absolutely loves to teach... and I'm sure it shows.

Learn computer science and mathematics by programming games
Pikuma .com
  • 4.7 Instructor Rating
  • 4,059 Reviews
  • 25,424 Students
  • 3 Courses

Pikuma.com was created by award winning professor Gustavo Pezzi to teach the fundamentals of programming, computer science, and mathematics.

We care about the basics. With our courses you will learn the low-level of how things work and why they work.

We currently have courses on mathematics, game programming, assembly language, 2D game engine, 3D renderization, C++, Lua, operating systems, and a lot more coming shortly…

If you'd like to learn anything in particular, contact us and let us know.

Top companies trust Udemy

Get your team access to Udemy's top 19,000+ courses