thecodingidiot.com

Chapters

Foundations

f01-the-terminal

The Terminal

Set up a command-line environment and learn the tools that run everything — from the first procedurally generated game to the C programs in every chapter that follows.

f02-version-control

Version Control

Build a complete git workflow from first commit to merge conflict to remote push — then clone a five-year single-author decompilation of Perfect Dark and read the history commit by commit.

f03a-digital-basics

Digital Basics

Count to 15 in binary with four LEDs, switch a transistor, and build NOT and NAND gates from a single chip — the same chip that will decode the 6502's address bus in the next chapter.

f03b-the-2600-hardware

The 2600 Hardware

Wire a working 6502 breadboard computer from scratch — CPU, ROM, RAM, clock, and address decode — and understand what a console cartridge actually is.

f03c-writing-6502-assembly

Writing 6502 Assembly

Write five programs for the 6502 breadboard — counter, LED, button, tone, game loop — using the instruction set that personal computing ran on for fifteen years.

f03d-why-c

Why C

Why assembly gave way to C — not as a matter of preference, but of scale. A short essay. No code.

f04-writing-c

Writing C

Write your first C programs — hello world, a calculator, a word counter, and a guessing game — using the language that became possible on consoles only when the hardware caught up.

f05-building-c

Building C

Move from single-file programs to a real C workflow — make, gdb, valgrind, sanitisers — by writing a tiny sort utility and then hunting the bugs you planted while writing it.

Systems

c01-the-toolkit

The Toolkit

Build libtci — a static library of string, memory, and character functions — to understand what the standard library does before you use it.

c02-the-voice

The Voice

Build tci_printf — handling %c, %s, %p, %d, %i, %u, %x, %X, and %% — to understand what printf does before you use it.

c03-the-reader

The Reader

Build tci_getline and tciu_split — the input side of the I/O pair that tci_printf opened: read a file one line at a time, then parse each line into fields.

g01a-the-developer

Who Wants to Be a Game Developer?

Build a terminal quiz game using tci_printf as the rendering engine — prize ladder, three lifelines, fifteen questions, one million pounds.

c04-the-infinite

The Infinite

Build a Mandelbrot, Julia, and Burning Ship fractal renderer — event loop, pixel buffer, viewport mathematics, and SDL2.

g01b-the-developer-graphical

Who Wants to Be a Game Developer? Graphical

Rebuild the terminal quiz game as a graphical SDL2 application — bitmap font rendering, PNG backgrounds, and a screen state machine.

c05-the-pipeline

The Pipeline

Build pipeline — a program that executes < infile cmd1 | cmd2 | ... | cmdN > outfile — to understand what the shell does when you type a pipe, and earn the linked-list API by representing the command chain as a list.

g01c-the-developer-acoustic

Who Wants to Be a Game Developer? Acoustic

Add background music to the terminal quiz game — fork and exec spawn aplay as a child process; signals and waitpid stop it cleanly.