12 minutes
Chunk Streaming
This lesson starts from the lab, with every code edit from the earlier lessons undone. RoadProbe can stay.
The chunk ring
Lesson 1.1 showed chunkWindow, which keeps a couple of chunks behind the car and eight ahead, and said the chunk that falls behind is rebuilt as the next one ahead. Here is how the System finds the right place to put it, and why two chunks built at different moments still meet without a crack.
The System keeps a ring of 11 slots. Chunk i always lives in slot i mod 11, the remainder after dividing by 11. Park the car at 1750 m, on lesson 1.1's bridge:
Drive on to 1770 m and the car enters chunk 59:
Chunk 67 went into slot 1, the slot chunk 56 just left. The chunk that drops off the back and the one that joins the front are always 11 apart, so they always share a slot. No list moves, and nothing searches for a free slot.

Continue reading
Unlock the Full Course
Every lesson, the runnable examples, and the finished build — yours to keep.