TrainsCoding
The TrainsCoding mascot, a round red locomotive face

TrainsCoding

An 8-bit coding playground for kids aged 5–10. You program characters by building trains: the locomotive is the event, and the wagons are the commands.

iPadOS 26 macOS 26 English & Polish No reading required
Start the guide Block reference
The TrainsCoding home screen: the dusk sky, the logo, project cards and sample cards

The idea

A program is a train

Every character on the stage owns some trains. A train always starts with a locomotive, which says when the train runs: when ▶ is pressed, when the character is tapped, when it bumps into a wall, when a message arrives, and so on.

Behind the locomotive come the wagons. Each wagon is one command: move, turn, say something, wait, repeat, switch gravity on, add 1 to a variable. The train runs its wagons from left to right.

Wagons are colour-coded by category and painted with a pixel icon, so children can read a program without reading words. While the program runs, the wagon that is working right now lights up.

“When ▶ is pressed, say Hi, then hop three times”

When ▶ pressed
Say“Hi!” · 2 s
Repeat3 times
×3
Kickup · 5
Wait1 s

What children learn

Six kinds of wagon, six big ideas

Events

Red locomotives. Programs react to the world: taps, buttons, bumps, timers and messages.

Motion

Blue wagons. Move in tiles, turn in degrees, jump to a spot, get a physics kick.

Looks

Purple wagons. Speech bubbles, costumes, colours, size, fading and a drawing pen.

Control

Orange wagons. Waiting, loops, if/else, messages, clones, and winning or losing.

Physics

Green wagons. Gravity, weight, solid and ghost bodies, magnets, joints and dragging.

Data

Yellow wagons. Four number boxes A–D, hearts, and showing a score on the stage.

The workspace

Stage and code

The stage during a run, with the on-screen gamepad
The square stage, 16 × 16 tiles. During a run, an 8-bit gamepad appears when the program listens to buttons.
The code editor during a run, with the active wagons lit up
The code editor. Trains are parked on rails; while running, the active wagons glow. A mini stage floats in the corner.

On iPad the stage and the code take turns on the full screen (swap mode), with a live mini stage floating over the code. On Mac they sit side by side with a draggable divider. Tour the workspace →

Documentation

Read on

Guide

Home screen, projects, the workspace and your first program, step by step.

Open →

Code editor

Building trains: dragging, coupling, nesting, parameters, values and conditions.

Open →

Stage & characters

The tile world, placing characters, the inspector, settings and controls.

Open →

Blocks

Every locomotive and wagon, with its parameters, defaults and exact behaviour.

Open →

How a run works

Runners, threads, the 60 Hz scheduler, events, physics and win/lose.

Open →

Samples

The four built-in projects, train by train.

Open →

Privacy

TrainsCoding collects no data at all. Read the privacy policy and the terms of use.

Open →

Values & conditions

Numbers, random, variables, properties, the timer, comparisons and touching.

Open →