YouTube Summaries

← All summaries

Vendoring SDL2 and an editor anchor system for a software-rendered game

2026-06-19 Fri ⏱ 2 hr 18 min @TsodingDaily

Tsoding returns to his software-rendered game and finds it no longer compiles: he deleted his system SDL2 while freeing disk space, exposing a hidden dependency. The stream becomes two threads — vendoring SDL2 into the project Jai-style, then implementing an editor "anchor" system for placing game objects.

Vendoring SDL2

  • Opens with the "harsh reality" bit: being a gamedev YouTuber is a full-time job pumping out engagement content, so the actual game progresses slowly in the background as a pet project.
  • Pins to SDL2 (not SDL3). Notes SDL still ships prebuilt binaries for Windows only — Linux gets source — so he must build it himself.
  • Adopts the Jai pattern (new to him in C): vendor the dependency into the repo and commit it. Drives the SDL2 build from his own nob build tool via a generated generate.c, shelling out to CMake.
  • Learns CMake live: -B <build-dir> sets the binary dir, -S the source dir, and cmake --build --parallel uses all cores. Produces a static libSDL2 linked into the game. Open question he chews on: how much do you vendor, and is committing binaries worth it vs a VM-style portability approach.

Editor anchor system

  • Switches to the level editor: fixes object snapping, then adds an anchor concept so objects align to a chosen reference point, plus a visual indicator for the active anchor.

Asides

  • Memorable rant: LLMs are "the asbestos of our time" — genuinely useful, but harmful when shoved everywhere indiscriminately (compares to mercury: useful properties, handle with care).