Knowledge makes the world so much more beautiful.
- Andrej Kaparthy (2025)
I’m not quite sure what inspired this project if I’m honest, I’ve many more important things to be doing with my time (watching youtube slop). Either way, C has always been so cool to me, and watching JDH, Tsoding etc shows just how much wizardry goes into something like this! It’s finally time to dig deep into C, take the plunge and just get something done. I’m going to apply the engineering mindset to the best of my ability, and produce something at least worthwhile.
credits - https://www.artstation.com/*killer_rabbit_media
Starting out
The first step was to decide how to go about building the game. What game would I make? For the sake of simplicity, it’s going to be a simple 2D pixel art game using SDL to help with the graphics, as a simple but effective way to get used to the procedual style of C, the syntax, incorporate some data structures and get used to working with libraries and header files. As well as this, I’d also have to think about performance, taking things step by step with the end goal of producing a working game.
Getting SDL step up proved to be trickier than I originally thought, as I’d never touched CMake or anything even remotely close to a build system for C. (scanning the docs was very useful for understanding what I was trying to create..) The closest I’ve been to a build tool like that would be maven for Java, but that’s still very much a “package manager” for dependencies, versus Cmake looked to be a build system for linking libraries. I pulled down the latest SDL from Github, followed along with the SDL build tutorial and ended up with this:
Cool. It does something, which is really useful to know. I always hate working from boilerplate as it always seems to beautiful, until I get my grubby fingers over it. Still, better to at least try and get my vision to exist first, then make it good. The next step is to actually draw something to the screen. Easier said than done.
I first thought it would be a good idea to delve into where an SDL program actually starts. Does it go from main? Apparently not, because working with different platforms means that upon execution of the program we will be expected to use a certain entrypoint, we can’t assume that main will be used as it is in a traditional C program.
I ended up on a bit of a tangent, with chatGPT leading the way. I was curious, with the starter program the SDL team give, how can we profile how well it performs? I thought I’d add on a simple bit of logic to the loop, and pop the FPS on the screen. One commit later-
And we have a profiler! I thought it was quite cool that this frame of nothingness was being rendered at 10k frames per second, but when the fans on my laptop sounded like a jet, it was time for some scaling to be put into place. See, I don’t need to run this game at 10k fps, I can simply do a division to calculate how long the last frame took, and make sure that if it is less than the delay calculated (1 second / frame cap given e.g 1 / 60 = 0.016s), we just do SDL delay until we’re ready to go. Keeps the process cap at about 1/2% cpu usage, versus 60/70% when with that 10k cap.

Time for something cooler. I got a subscription to t3 Chat recently, and it’s been really cool. I’m taking Grok 4 for a spin, which I’m really excited to do. TBC!
Github for the project: https://github.com/PaulDavidTucker/MiniWorlds
Docs I was following along from:
- https://wiki.libsdl.org/SDL3/README-main-functions
- https://en.wikibooks.org/wiki/Subject:C_programming_language
- https://cmake.org/cmake/help/latest/
Assets here: Grok chats: