Code Self Study Forum

3D Graphics Programming from Scratch

Note: This thread was split from Learn Assembly Language by Making Games for the Atari 2600

I got an email about the instructor’s new course. I’ve been searching for exactly this kind of content over the past few weeks, and just saw the email a few minutes ago. :exploding_head:

Edit: he also has a course on raycasting. If you click through to his profile (or website) there are many interesting things there.


I started watching the 3D graphics programming videos and they are pretty interesting. It uses C and SDL2.

I was curious about whether SDL code could run in WebAssembly (since C can compile to wasm), and I found this blog post:

SDL 2.0 support is also included via Emscripten Ports - a collection of useful libraries, ported to Emscripten and integrated with the Emscripten compiler (emcc). This is an official, full release of SDL 2.0 - compatibility should be near 100%

He said that he was using C instead of C++ because it would make the ideas more portable to other languages. It looks like SDL works with many languages and on many operating systems.


For what it’s worth, I’ve just compiled SDL2 on the Pi 4B because the default version is configured for X11 and I needed the non-X version of that. It’s a Kivy thing.

1 Like

Out of curiosity, I searched around to see if Kivy can run in the browser with #webassembly and it looks like someone did it. The demos might only run in Firefox though.

I’m only a third of the way through the course, but it’s a lot of fun so far.

3D rotating cube

Edit: a little further in the course:

3D jet


That’s actually working in Safari for me. :grinning:

1 Like

I remember back in the Pascal programming days building up a 3D rendering engine. It was wonderful as I recall. This would have been in those days when you had to purchase and physically install a math coprocessor chip into your motherboard. Lots of linear algebra. It’s a bit like what goes on under-the-hood with tools like gimp/jimp and Adobe Photoshop.