Skip to content

Getting started

Kaapers edited this page Oct 9, 2026 · 1 revision

Getting started

Your first factory

After the logo, the loading screen and the title menu, press ▶ Play. You start on an empty island with a code window open on main.py, which already holds a small starter script.

Press ▶ Run (or Ctrl+Enter, or F5). The game reads your script and builds what it describes. Then change something, like a number, and press Run again: the game adds, moves and removes only what changed. If your script has a mistake, nothing changes and the console points at the line.

Here is a bigger example: three miners, each with a belt to its own smelter, all powered by one steam generator.

from auto import conveyors, machines
import power

machines.place("steam_generator", name="steam", x=8, y=9)
for n, y in enumerate([1, 4, 7]):
    machines.place("miner", name=f"miner_{n}", x=0, y=y, ore="iron")
    for x in range(1, 6):
        conveyors.place(x=x, y=y, dir="east")
    machines.place("smelter", name=f"smelter_{n}", x=6, y=y)
    power.connect(generator="steam", to=[f"miner_{n}", f"smelter_{n}"])

The grid

  • The island starts 16 tiles wide (x from 0 to 15) and 10 tiles tall (y from 0 to 9). (0, 0) is the bottom-left tile.
  • Point at a tile to see its x and y in the top-right corner.
  • "north" is up, "east" is right, "south" is down, "west" is left.
  • Bigger islands, up to 28 by 15, are in the Shop. (0, 0) never moves, so your scripts keep working.

What you can import

Import What it is for
from auto import conveyors, machines, splitters build belts, machines and splitters
import power connect machines to steam generators
import console colors and clearing for print()
import sensors how many items are on a belt tile, how hot a generator is
import stats items made, items per minute, coins
import clock the current tick, seconds, and time of day

The 📋 Cheat sheet button in the top bar lists everything inside each module, and Help (F1) explains each command with an example you can insert.

Making money and growing

  • Belt your products into a station. Every 30 seconds the cargo train buys everything in your stations.
  • Spend coins in the Shop (F3): faster belts and machines (use them with tier=2 or tier=3), quick splitters, and bigger islands.
  • Crafters turn plates into gears, pipes and engines, which sell for more. Click a crafter to pick its recipe. Recipes are unlocked by 🏆 Achievements.
  • The Engineering Manual (F2) teaches one idea per chapter (loops, functions, modules, generators...) with contracts that pay coins.
  • Write a tick() function to run code every tick: switch machines on and off, react to sensors, print a live dashboard.

Controls

Key or button What it does
▶ Run, Ctrl+Enter or F5 Run main.py and update the factory to match
Esc or ☰ Menu Pause menu: Resume, Settings, Title screen, Quit
F1 / F2 / F3 / F4 Help / Manual / Shop / Stats
F6, then F7 / F8 Debug: record a run, then step back and forward line by line
Files > + New file Add a file; use it from main.py with import
+ Window Open another code window; windows that import each other are linked by a cable
Drag empty space / mouse wheel Move / zoom the world (Home centers it again)
Space / . / 1 2 3 Pause / step one tick / speed 1x 2x 4x
M Sound on or off

Code windows stay where you put them in the world, so you can park them around the island. Scripts save as you type.

Stuck? See Troubleshooting or ask on GitHub.

Clone this wiki locally