Create: Computing AgesBrass Docs
Built-in programs

Built-in programs

The ready-made programs every computer carries: list them, copy one, read it and make it yours.

Every computer comes with a set of ready-made programs, written to be read: short, commented in your language, each one showing a real use of a computer in a Create world. They are the fastest way to get something working, and the best way to learn: copy one, run it, then open it and change it.

List them

Type examples at the prompt. The list only shows the programs this computer can run, and says how many more a newer computer would offer:

Terminal
> examples
hello - your first program
blink - blinks a lamp on top
counter - counts redstone pulses
sequencer - a step sequencer
clock - the time, on a monitor
stock - watches a chest, alarm
speed - drives a speed controller
traffic - a traffic light cycle
buttons - clickable control panel
minecraft - Minecraft in Minecraft (2D)
shapes - draws a scene with gfx
paint - draw with the mouse
devices - map of the connected devices
balloon - hot air balloon autopilot
talk - sends messages
listen - receives messages, remote
pong - network pong for two
'examples <name>' copies it to disk.

That is a Personal Computer, which runs them all. A Tube Computer lists the first nine and ends with 8 more on a transistor mainframe or newer.: the drawing programs need gfx (Transistor Mainframe and newer), the network ones need net (Minicomputer and newer), and minecraft needs the speed and colours of a Personal Computer.

Copy one

examples <name> writes the program onto the storage medium (or into the soldered memory of a Microcontroller), as an ordinary file named after it. Give a second word to choose the file name:

Terminal
> examples traffic
Saved as 'traffic'. Read it: edit traffic   Run it:
 traffic
> examples traffic crossing
Saved as 'crossing'. Read it: edit crossing   Run i
t: crossing

The shell never overwrites a file: if the name is taken, it answers 'traffic' already exists: 'examples traffic <other name>'. So after changing a copy, you can always get a fresh original under another name and compare.

Want one to run by itself at boot? Copy it straight to startup: examples blink startup.

Read it and make it yours

edit traffic opens the copy in the editor. The comments at the top tell what to place around the computer, and the comments along the code explain the lines that matter. Rest the mouse on any function name for its documentation.

Then change it: another side, another delay, a second lamp. Save with Ctrl+S, go back with Esc, type the name to run it, Ctrl+T to stop it. Each page below explains one program: what it does, what to build around the computer, how its interesting lines work, and ideas to take it further. The full source, as the game copies it, is at the bottom of each page.

Tip

The copy follows the language of the player at the keyboard: its comments and messages are in French for a player who plays in French. The code itself is the same.

The programs