By Lawrence
5 minutes
5 minutes
The Level Is Data
The rocks look like rocks now, but the sandbox is one layout typed into the scene. A second level would mean a second scene.
A level is a list of numbers
A level is where the chute sits and which way it points, where the plant is and where the black holes start. A director reads those numbers, takes a piece from a pool for each, and parks every piece again when the level ends. Level 1, First Bend, takes three acquires: a chute, a plant and a hole. R parks the same three slots and gets them straight back, because a pool's free list is a stack: the slot parked last is the next one out.
Continue reading
Unlock the Full Course
Every lesson, the runnable examples, and the finished build — yours to keep.
$9one-time
=