I write games in C (yes, C) (2016)
C vs. C++ for Game Development and Teams
- One side argues C becomes painful in teams: everyone must share a mental model of object lifetimes and “C idioms,” which many newer devs lack. C++’s ownership tools (e.g., smart pointers) and STL containers make collaboration and review easier, especially for desktop-style code with complex object graphs, threads, and futures.
- Others counter that C is simpler, with fewer stylistic choices and language features to argue about, and that C++ codebases are actually harder to keep coherent. Subsetting C++ reliably across a team is seen as difficult.
Simplicity, Productivity, and Domains
- Several commenters resonate with the author’s preference for “simple” languages (C, Go, Odin, Zig) for solo projects and indie games, valuing directness and low abstraction.
- Others see C as effectively “portable assembly” plus a custom ecosystem of libraries and conventions; productivity comes from that ecosystem, not the core language.
- There’s disagreement whether C in 2026 is a realistic choice for new games: some call it “hardcore mode” or “a little crazy,” others note many still do it and that finishing a game matters more than the language.
Memory Management, Safety, and Tooling
- Pro‑C++ commenters highlight automatic resource management (RAII, smart pointers) and better strings/containers as critical advantages; re‑implementing these in C is seen as needless work and error‑prone.
- Pro‑C commenters prefer transparency: no hidden destructors or exceptions; leaks and misuse can be managed with discipline, static analysis, and CI tools (valgrind, sanitizers, leak detectors).
- Debate arises whether avoiding advanced language features meaningfully reduces bugs, or whether the main gains come from tests and tools.
History and Ecosystem
- Many point out that “writing games in C” was standard through the 1990s (id engines, etc.); C++ gradually took over AAA game engines, though C APIs remain dominant (OpenGL, Vulkan, SDL, some physics libs).
- Some note that even “C++ games” historically were often “C with classes,” using minimal C++ features.
Alternatives: Rust, Go, Odin, Zig, Haxe, Nim
- Rust is praised as a “necessary complexity” language for highly concurrent, networked systems, but seen as overkill for small indie games.
- Odin and Zig receive enthusiasm as “modern C-like” options aimed at game dev, with simple syntax, good C interop, and batteries-included libraries. Haxe is liked but perceived as ecosystem-stagnant.
- Discussion of Go focuses on GC pauses; several note the article is from ~2016 and that Go’s GC has improved; others argue low-level control (SIMD, cache layout, GPU) is a more relevant constraint than GC pauses. Nim is mentioned for non–stop-the-world and ARC-based memory models.
C vs. “C as a Subset of C++” and Strings/Containers
- Some claim “choosing C is choosing a C++ subset enforced by the compiler”; others emphasize incompatibilities and say C++’s added footguns outweigh benefits.
- There’s wide agreement that C’s string handling and lack of standard vectors/hash maps are painful; various workarounds (custom libs, sds-style strings) are discussed, but many see this as exactly why they’d rather use C++ (or another modern language).
Compile Times and Tooling
- C is praised for fast compile times; some report C++ mode compiling the same source significantly slower due to heavier headers, exceptions, and STL. Others argue templates per se aren’t the problem; gigantic in-header code and standard library complexity are.
Learning Resources and Practical Tips
- Suggested starting points for C game dev include raylib, SDL, Clay or Dear ImGui/CimGUI for UI, and “dos-like” or similar small engines.
- There’s a caution against using Handmade Hero as a beginner’s primary resource due to its anti-library stance and very low-level approach.
Identity and “Hardcore” Signaling
- Some see “I write games in C” essays as more about self‑image and contrarianism than technical necessity, likening it to riding a fixie bike.
- Others push back, arguing that choosing C today can reflect independent thinking, a desire for transparency and control, or dissatisfaction with the complexity and churn of C++.