A minimalist Pong game in C, developed with SDL2 to deepen my knowledge of low-level programming. This project focuses on understanding how a program works, while providing a simple local multiplayer gaming experience. A fun way to explore the fundamentals of low-level development.
I chose to create this project to deepen my skills in C language and discover SDL2 library in more detail. After acquiring the basics of the language, I wanted to put my knowledge into practice in a concrete project, while exploring the graphical and interactive aspects that SDL2 offers. Recreating a simple and iconic game like Pong allowed me to focus on the logic of the code, event handling, and display, without being slowed down by excessive complexity.
At first glance, C may seem very complex compared to other languages like Python or JavaScript. It offers rather basic features, imposes strict typing, sometimes tedious dependency management, and in some cases, even requires manual memory allocation. However, these constraints hide several major advantages, making C a particularly useful language when used in the right context.
C is a language known for its speed and closeness to the system. It is commonly used in critical parts of a program, where performance is crucial and fine hardware control is required, such as in embedded systems, game engines, or OS kernels. While not necessary for a simple project like Pong, using C here allows exploring these low-level aspects and better understanding the foundations of system development.
Learning C is about going back to the pure basics of programming: types, functions, pointers, memory... Each concept is manipulated explicitly, without unnecessary abstractions. In this sense, coding in C is not just about learning a language, but about understanding what a program truly is and how instructions interact with the system. This clarity makes it a valuable entry point to grasp the fundamental principles found in almost all modern languages.
Although it may seem daunting at first, C remains fundamentally simple. It offers few abstractions and focuses on a small number of key concepts: variables, types, functions, structures... In the absence of high-level features like classes, promises, or frameworks, you focus on the essentials. This ultimately makes it more predictable and easier to master when you want to write clear, structured code with no hidden magic.
C is particularly suited for contexts where performance and hardware control are essential. It also helps better understand the basics of programming, making it an excellent choice for learning or developing systems close to the hardware.
make run