Chunks and the draw distance
How Block Valley draws a 55,296 cell world at 30 frames a second: chunks, faces that touch air, and a draw distance hidden by fog. Then see further.
Chunks
The valley is cut into 9 chunks of 16 by 16 columns. Each chunk keeps a list of only the block faces that touch air, with soft shadows in the corners. The list is rebuilt only when a block in that chunk changes, so breaking a block rebuilds one chunk, not the world.
Each frame only the chunks near and in front of the eye are drawn, and the engine drops faces turned away, faces off screen, and cells past DRAW_R.
GameCube Advanced is a course for paid accounts. The rest of this lesson, and its guided session, are in the app.
Next lessonJumping in real numbers