Game · Programming

Logica: Code Tock Home

Learn to program by guiding Tock the robot. Write real JavaScript, press Run, and watch every line come to life.

Play nowSend feedbackFree · no login · JavaScript
Logica level 38: Tock paints red and blue stripes on the board from a JavaScript for-loop, with the goal and a line-by-line explanation beside the code.

Your turn

How is Logica going?

A rating and one sentence is enough. Comments are published after approval.

Your rating

From learners

What people said

4.9 average · 7 comments
  • ABHISRI

    “Intersting game at the same time skill developing.”

  • A learner

    “actually its a nice game for improving our coding skill.it very intreseting game .its a nice way to learn coding immediately”

  • Student

    “interesting game , add more hard levels ... expecting more games like this , i also want to how to build these kind of games”

  • A learner

    “first few levels were very simple.The level starts with simple and the level of toughness increasing.thats the best part.”

  • Student

    “nice game to start learning python”

  • A learner

    “wonderfull”

  • Rejin R · Teacher

    “Loved the way programming is taught with this game.”

How it works

  1. 01

    Read the goal

    Each level asks Tock to do one clear thing on the board.

  2. 02

    Write the code

    Type it yourself, or tap the command buttons if you are still finding the keys.

  3. 03

    Press Run

    Tock carries out the program one line at a time, on a 3D board.

  4. 04

    Read the explanation

    Plain words for every line — then fix the mistake and try again.

What learners learn

One new idea per world, in this order:

  1. Commands and sequence
  2. Variables
  3. Text (strings)
  4. Comparisons and decisions (if, else, else if, switch)
  5. Loops (while, for)
  6. Loop patterns (counters, running totals, break, nested loops)
  7. Lists (arrays)
  8. Functions (parameters, return)

The teaching idea behind it

I built Logica the way I wish a first programming class would go. Each level teaches exactly one new idea, and nothing is used before it has been taught. A new idea always arrives with a real-world analogy — if it is raining, take an umbrella — so the syntax has somewhere to sit. Learners type the code themselves. Then the same program is tested on several worlds, so a hard-coded answer fails and they have to use variables and loops for real. When they get stuck, the error names the line and explains the mistake in plain words.

For teachers

  • Free to use in class.
  • Runs in any modern browser, on laptops and phones.
  • No login.
  • Progress is saved on the device.

Questions about using it with a class? Email [email protected].