Create: Computing AgesBrass Docs
Reference

Limits

Every number of the computers: speed, memory and its costs, screens, storage, network, events and the hard limits of the language.

Every limit of the computers and of the language, in one place. The last column names the file of the mod where the number is set, for the curious. The server owner can change a few of them in world/serverconfig/computingages-server.toml: they are marked "config".

The six computers

Computeros.tier()Instructions per tickPer second at 256 RPMMemory (cells)Stress (su per RPM)
Tube Computer1204002,04816
Transistor Mainframe2801,6008,1928
Minicomputer33006,00032,7684
Personal Computer41,20024,000131,0722
Microcontroller44008,00016,3841
Modern Computer55,000100,0001,048,5761
ComputerScreenText (columns × rows)gfx drawing (pixels)StorageNetwork
Tube Computerpaper teletype40 × 14none: no gfxPunch Card Deck, 4 KBnone
Transistor Mainframegreen phosphor51 × 19306 × 171Magnetic Tape Reel, 16 KBnone
Minicomputeramber phosphor51 × 19306 × 171Floppy Disk, 64 KBData Cable
Personal Computer16 colours51 × 19306 × 171Floppy Disk, 64 KBData Cable, Radio Modem, Wi-Fi Router
Microcontroller16 colours40 × 12240 × 108soldered memory, 16 KBData Cable, Radio Modem, Wi-Fi Router
Modern Computer16 colours64 × 24384 × 216Solid-State Drive, 1 MBData Cable, Radio Modem, Wi-Fi Router

Libraries by computer: gfx everywhere but on the Tube Computer, net from the Minicomputer on, vehicle on the Personal Computer, the Microcontroller and the Modern Computer. The stress values are the defaults of the config (one key per computer). Source: ComputerTier.java, CAConfig.java, ComputerApis.java.

Speed

LimitValueSource
Full speedat 256 RPM, in either direction; faster gives nothing moreComputerTier.java
Below 256 RPMproportional: half at 128 RPM, an eighth at 32 RPM; the fractions of an instruction add up from tick to tickMachine.java
No rotation, or overstressedthe computer is frozen: no instruction, timers and sleep pausedComputerBlockEntity.java
Cost of an instruction1; a library call costs 1 plus its extra cost (table below)Interpreter.java
Budget left when the program waitslost for that tickMachine.java
Waits already satisfiedthe program resumes in the same tick, 16 times per tick at mostMachine.java
Extra costs above the budgeta debt, paid back on the next ticksInterpreter.java
Changes to the world (redstone, links, set_speed)applied once, at the end of the computer's tick; the last value asked winsComputerBlockEntity.java
Bootsone every 10 ticks at most (half a second); a quicker reboot waitsComputerBlockEntity.java
Computers per server tick512 (config maxComputersTickedPerTick, 16 to 100,000); beyond, the others run every other tickCAConfig.java

Extra cost of library calls

Divisions are rounded down: printing 40 characters costs 1 + 2 instructions.

CallExtra instructions
print, write, term.write1 per 16 characters
fs.read, fs.write, fs.append1 per 16 characters
fs.copy1 per 16 bytes copied
import1 per 16 characters of the file
string.find, string.split1 per 16 characters of the text
string.rep1 per 8 repetitions
table.insert at a position1 per 8 elements of the list
table.remove1 per 8 elements after the position
table.concat1 per 16 characters of the result
table.contains1 per 8 elements
table.sort without a functionabout n × log2(n) for n elements
table.sort with a functioneach comparison is a call of your function
gfx.pixel, gfx.line, gfx.rect, gfx.circle, gfx.triangle, gfx.clear, gfx.fill, gfx.scroll1 per 64 pixels touched
gfx.textcharacters × scale × scale
gfx.image1 per row, plus 1 per 64 pixels
os.memory1 + 1 per 16 cells in use (it measures the memory)
net.send32, plus the walk of the network and the copy of the data
net.broadcast64 + 8 per computer in reach, plus the walk and the copy
net.computers, net.networks64, plus the walk of the network
peripheral.list, peripheral.find16 + 4 per block touching the Data Cable network
peripheral.wrap8
A network name (type@x,y,z)1 per 4 blocks touching the network
vehicle.position, vehicle.velocity, vehicle.speed8
Inventory list, count, push1 per slot of the inventory
Kinetic stress, capacity1 per block of the kinetic network

The walk of the network costs 1 per block touching the computer's Data Cable network, plus, on the Personal Computer, the Microcontroller and the Modern Computer, 1 per loaded computer of the world. The copy of a message costs 1 per value plus 1 per 16 characters. Sources: the libraries (BaseLib.java, FsLib.java, StringLib.java, TableLib.java, GfxLib.java, NetApi.java, PeripheralApi.java, VehicleApi.java, DeviceAdapters.java).

Memory

The memory of a computer is counted in cells. Only the data the program can still reach counts: a table no variable points to any more is free again.

WhatCellsSource
A table4Interpreter.java
Each entry of a table (key and value)2, plus the cells of a string or table stored in itInterpreter.java
A string1 + 1 per 8 characters (a 100-character string: 13 cells)Values.java
A number, a boolean, nilnothing beyond the slot that holds itInterpreter.java
A global variable2 + the cells of its name, plus its valueInterpreter.java
A function value4Interpreter.java
The local variables of a file (chunk level)1 eachInterpreter.java
The code of a file1 per 4 words of bytecode + 1 per constant + 4 per functionProto.java
A call in progress8, plus 1 per value on the stackInterpreter.java
An event waiting in the queue6 + 2 per field + the cells of its strings and tablesEvent.java
The libraries (math, term...)freeInterpreter.java
LimitValueSource
Measuring the memoryos.memory() measures it now, at a cost of 1 instruction per 16 cellsOsLib.java
When the count passes the capacitythe memory is measured again; out of memory only if the live data really exceeds itInterpreter.java
Receive buffera message is refused when it would make the waiting events take more than a quarter of the memory: 8,192 cells on a Minicomputer, 32,768 on a Personal Computer, 4,096 on a Microcontroller, 262,144 on a Modern ComputerMachine.java

Language

LimitValueErrorSource
Calls inside each other200stack overflowInterpreter.java
Values on the stack65,536stack overflowInterpreter.java
Length of a string65,536 charactersstring too longInterpreter.java, StringLib.java, TableLib.java
Blocks and parentheses nested in the source200too many nested levelsParser.java
Numbers64-bit floating point; printed with 14 significant digits; whole numbers below 10^15 print without decimalsValues.java
Whole-number argumentsup to 2,147,483,647number has no integer representationValues.java
string.formatwidth of 2 digits at most, precision 99 at mostinvalid conversionStringLib.java
string.charcodes 0 to 65,535value out of rangeStringLib.java
tonumber(text, base)base 2 to 36base out of rangeBaseLib.java
Tables sent by net32 levels deeptable is too deep (or cyclic) to convertValues.java

Events and time

LimitValueSource
Tick1/20 of a second: os.time() counts them, os.clock() is os.time() / 20OsLib.java
Event queue256 events; when full, the oldest is droppedMachine.java
Timers waiting at the same time256 (too many timers)Machine.java
sleep and timersrounded up to whole ticks, 1 tick at leastBaseLib.java, OsLib.java
net.receive(timeout)rounded up to whole ticks, 1 tick at leastNetApi.java
os.day_time()0 to 23,999 (0 is sunrise, 6000 noon)OsLib.java
drag eventsone every 50 ms at mostTerminalScreen.java
paste4,096 charactersTerminalScreen.java, ComputerBlockEntity.java

Screen and keyboard

LimitValueSource
A character6 × 9 pixels of the gfx drawingTerminal.java
Colours16 (see Colours)Terminal.java
Tab stops of print and writeevery 4 columnsTerminal.java
gfx pixel size, line thickness, text and image scale1 to 64GfxLib.java
gfx.fill1,048,576 pixels at mostGfxLib.java
gfx.text font3 × 5 pixels, no accents (é becomes e)Graphics.java
Monitor wallup to 8 blocks wide and 6 high: monitors of the same kind, facing the same way, forming a full rectangleMonitorGroups.java
A line of read() or of the prompt1,024 charactersLineInput.java
History of the prompt50 linesLineInput.java
Distance to use a terminal16 blocksComputerBlockEntity.java
Screen updates sent to playersevery 2 ticks at most (config terminalSyncInterval, 1 to 20)CAConfig.java

Storage

MediumCapacityRead bySource
Punch Card Deck4 KB (4,096 bytes)every computer with a drive (all but the Microcontroller)CAItems.java
Magnetic Tape Reel16 KB (16,384 bytes)Transistor Mainframe, Minicomputer, Personal Computer, Modern ComputerCAItems.java
Floppy Disk64 KB (65,536 bytes)Minicomputer, Personal Computer, Modern ComputerCAItems.java
Solid-State Drive1 MB (1,048,576 bytes)Modern ComputerCAItems.java
Soldered memory of the Microcontroller16 KB (16,384 bytes)the Microcontroller only (it has no drive)ComputerTier.java
LimitValueSource
A file or folder name1 to 32 characters: letters without accents, digits, _, ., -; not . or ..FileSystem.java
A whole path128 characters, slashes includedFileSystem.java
Files and folders on one medium1,024FileSystem.java
Size of a fileits text in UTF-8 bytes: 1 byte per plain letter, 2 for éMemoryFileSystem.java
Size of a foldernothing (only the files inside count)MemoryFileSystem.java
A file in the editorup to the free space of the medium plus its own size, 1,048,576 characters at mostComputerBlockEntity.java
Undo in the editor200 stepsCodeBuffer.java

Network

LimitValueSource
A message2,048 values (keys included) and 32,768 characters of text in all, 32 levels of tablesNetApi.java, Values.java
Receive buffera quarter of the receiver's memory (see Memory)Machine.java
Radio Modem128 blocksRadioBlock.java
Wi-Fi Router256 blocks; all the routers with the same SSID form one networkRadioBlock.java
Range multiplier1 (config wirelessRangeMultiplier, 0.1 to 16), applied to both rangesCAConfig.java
Between two antennasthe shorter of their two rangesNetworkManager.java
SSID32 characters, longer names are cutWifiRouterBlockEntity.java
Data Cable network2,048 cables explored from a computerWiredNetworks.java
distance of messages and net.computersrounded to a tenth of a blockNetworkManager.java
Who receivescomputers that are on, in loaded chunks that tick; a computer at the shell prompt (no program running) loses the message, although net.send returned trueNetworkManager.java, Machine.java

Blocks and world

LimitValueSource
Redstone strength0 to 15; rs.set and link.set bring other values back into that rangeComputerBlockEntity.java, LinkApi.java
Redstone Link frequencies32 per computer, link and Redstone Link peripherals together (too many link frequencies)LinkApi.java
Redstone Link rangeCreate's own linkRange: 256 blocks by default (Create's server config)Create
Display Link lines16 lines of 128 characters; longer lines are cut, extra lines ignoredDisplayApi.java
Label of a computer32 characters (os.label refuses longer, the label command cuts)OsLib.java, Shell.java
Readings of the Create Simulated sensorsrounded to 0.001SimulatedSensors.java
vehicle.position, vehicle.velocity, vehicle.speedrounded to 0.01VehicleApi.java
push of an inventory64 items when no count is givenDeviceAdapters.java