A C++ program called credits was purpose-built to generate the closing credits. This program completely contained the LegoBoard and tgl libraries, as well as borrowing and improving on some mini "kernel" and "process" code from falling (see the Scene 00 - Opening Titles page for more on 'falling'.)
Credits has 16 (or more) virtual LegoBoard "layers" (or "devices" if you want to
stretch this operating system analogy to breaking point) that can be written on
by tgl or windows api. All layers start out as transparent.
A process is written for each type of animation that needs to be done in the
credit sequence. Each process does something simple and can be scheduled to
execute at a particular time (or tick of the kernel clock).
- simply plonk centered text somewhere on a layer.
- write text onto the screen from left to right with a little sparkle where it is creating characters.
- erase the whole layer.
- copy one layer to another.
- do a fancy animated wipe of the layer with spinning lines.
- do a fancy left to right wipe with matrixy looking characters.
- explode all the 1x1 blocks on a layer with different directions and velocities.
So now, using those building blocks, you can create a process to write some text
on the screen, add a couple of seconds to the time counter and create a process to
wipe them off again. And so on with each of the credits required.
When all the initial processes are queued up on the time line, the mini "kernel"
is started. At each tick of the clock the kernel checks the time queue to see if
any process needs to be launched and also gives a tick of time to each process
already running. At the end of the tick all the LegoBoard layers are merged together
to form an output board. This output board can be displayed simply on the
screen as a preview or fully rendered as Lego and written to a bitmap file.