Skip to content
Michael Malura
562 GitHub stars 5810 npm downloads 53 Projects

Game Dev Snippets

Small game dev demos in C++ with SDL3. Every folder is one demo, and each one runs natively and in the browser.

I've wanted to write down small game dev things for a while, the kind you otherwise spend ages searching for: how an update loop works properly, how to find a point in a polygon, how water ripples happen. Text and code snippets alone are dry for that. So every blog post comes with a demo you can start right in the article.

The repo is a single CMake project. Every subfolder is a demo with its own main.cpp, SDL3 is pulled in through FetchContent, and two commands build everything natively. The same sources run as WebAssembly through Emscripten. A Docker container on my server builds them on every push and puts them on demos.malura.de, which has a gallery with screenshots. Demos whose post hasn't been published yet stay hidden. Where C++ would be overkill, the demo runs in Python with pygame-ce through Pyodide in the browser.

A new folder lands roughly every week. Delta time, point in polygon, raytracing and water ripples are next.

Tech stack: C++20, SDL3, CMake, Emscripten, WebAssembly, Python, Pyodide, pygame-ce

Links:

Share X Reddit Hacker News LinkedIn E-Mail