How the game works
- Pixel runs by herself. You never have to time a jump. All of the skill is in the code.
- Every obstacle is a function to write. The task, a few worked examples and some starter code are on screen.
- Press Run tests. Your function is marked against every test. If they all pass, Pixel jumps the obstacle and runs on.
- Three obstacles clear a level, and ten levels clear the game. The first level asks you to join two pieces of text. The last asks you to write Dijkstra's algorithm.
- If the obstacle wins, you go back a level. Use up your three attempts, or give up, and Pixel is knocked back to the start of the previous level. You are shown a working solution first, so the setback teaches you something.
Every level has five challenges and a run uses three of them. When you are sent back, the level you replay deals the challenges you have not met yet, so remembering answers will not get you through.
The ten levels
| Level | Name | The idea | Revise first |
|---|---|---|---|
| 1 | Print Plains | Text and arithmetic inside a function | Variables and data types, String manipulation |
| 2 | Variable Valley | Variables, operators and rounding | Input and operators, Variables and data types |
| 3 | Selection Stream | if, elif and else | Selection: if, elif and else |
| 4 | Loop Lagoon | for and while loops | Loops: for and while, String manipulation |
| 5 | List Landing | Lists, nested lists and searching a list | Lists, Arrays, records and files |
| 6 | Function Fort | Parameters, return values and validation | Functions and structure, Subprograms and parameters, Validation and testing |
| 7 | Dictionary Dunes | Dictionaries and records | Dictionaries, files and errors, Arrays, records and files |
| 8 | Searching Summit | Searching and sorting algorithms | Searching and sorting, Sorting algorithms in depth |
| 9 | Recursion Ruins | Recursion | Recursion |
| 10 | Complexity Castle | Stacks, queues, graphs and bitwise operations | Stacks and queues, Trees and graphs, Dijkstra and A*, Binary and bitwise operations |
The first three levels are the foundations every program is made of. Levels 4 to 8 are the Python that the GCSE specifications (OCR J277, AQA 8525 and Edexcel 1CP2) expect you to write, up to the searching and sorting algorithms by name. Levels 9 and 10 are A Level: recursion, stacks, queues, graphs, shortest paths and two's complement.
What a challenge looks like
Level 1, first obstacle: write a function that greets someone. You are given the function's name and a comment, and you fill in the rest.
def greet(name):
# return "Hello, " then the name then "!"
passYour function is then run on a set of calls, and each answer is compared with what the tests expect:
| Call | The test expects |
|---|---|
greet('Asha') | 'Hello, Asha!' |
greet('Ben') | 'Hello, Ben!' |
greet('') | 'Hello, !' |
A test passes only when the answer matches exactly. True is not 1, a list is not a tuple, and "5" is not 5. Numbers are compared as numbers, so 2 and 2.0 are the same answer.
The loop challenges ask you to use a loop, the recursion challenges ask the function to call itself, the sorting challenges will not accept sorted(), and the binary search counts how many items you look at. If your answers are right but you broke a rule, the game says so, and it counts as an attempt.
Attempts, hints and stars
Every challenge gives you three attempts. An attempt is a run where your code ran and a test failed, or a rule was broken. A syntax error, or forgetting to define the function, does not use an attempt, because nothing was marked.
| Stars | How you earned them |
|---|---|
| 3 stars | Passed with no slips and no hints |
| 2 stars | Passed after one slip or one hint |
| 1 star | Passed after more than that |
There are two hints on every challenge, and each one costs a star. Each level is worth up to nine stars, and the whole game is worth ninety.
Questions
Does my code leave my computer?
No. Python runs inside your browser tab, using Pyodide, which is Python compiled to WebAssembly. The tests arrive with the page and your code is marked on your own device. Nothing you write is sent anywhere, stored on a server or seen by anyone.
Do I need to install anything or make an account?
No. The first time you play, your browser downloads Python once (roughly ten megabytes, which it then keeps). That happens while Pixel is running towards the first obstacle.
What if Python will not load?
Some school networks block the download. If Python cannot be loaded, the game offers quiz mode: instead of writing the function you read a short piece of code and choose what it returns. The levels, the stars and the going-back-a-level rule all work the same way.
Is my progress saved?
On your own device only, in your browser's local storage, so you can pick up from the level you reached. Clearing your site data, or switching to a different browser, starts again.
Can I use it in a lesson?
Yes. It is free, there is nothing to sign up for, and every student plays on their own device. It works well as a starter, a plenary, or revision for a unit on programming. Because nothing is recorded centrally, a teacher cannot see who has played, and the best check is to ask students to show their level and star count.
Each level lists the topics to read first. Reading the topic and then playing the level is the fastest way through, and the game links straight to it whenever a level beats you.