• Post category:StudyBullet-3
  • Reading time:5 mins read


Learn to create a game loop from scratch using the C programming language and SDL

What you will learn

C Programming Language

SDL

Game Loop

Description

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:


Get Instant Notification of New Courses on our Telegram channel.


  • 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.

English
language

Content

Introduction
Motivations and Learning Outcomes
Dependencies
Installing SDL
Picking a Code Editor
Building Our Project
Compiling Our Code
Building with Makefile
Creating a Window
Creating a SDL Window
User Input
Handling User Input
Rendering
Rendering with SDL
Drawing a Rectangle
Updating Our Game Objects
The Update Function
Fixing Our Time Step
Updating as a Function of Delta Time
Final Project
Download Source Code
Bonus Lecture
Discount on Our Other Courses