Escape Sequence / project guide

Learn to code by helping a drone escape.

Start with blocks, move into JavaScript, and solve bigger problems as you go. The drone, commands, and game world stay familiar the whole time.

Explore the project

01 / Quick pitch

What is Escape Sequence?

A short explanation of the game and why it matters.

Watch the pitch

Escape Sequence in action

Watch on YouTube

02 / The problem

AI is changing how people learn and practise coding.

AI can write and explain code quickly. That is useful, but developers still need to understand, review, fix, and improve the code it gives them.

It is easy to skip the thinking

When an AI tool gives the answer, people can finish a task without learning why the code works. That makes it harder to spot mistakes or solve the next problem alone.

Learning can feel dry or frustrating

Normal coding exercises can be intimidating. When learners get stuck, searching or asking a general AI tool often gives away the answer before they understand it.

01

A game with a purpose

Your code controls a drone in the story, so every challenge changes what happens in the game world.

02

Skills build over time

Each level uses ideas from earlier levels, so learning feels like moving forward instead of doing random exercises.

03

Help without handing over the answer

ARIA uses the challenge and the learner's attempt to give a useful next step, not a full solution.

Our answer

Escape Sequence turns coding practice into a story-driven game. Players use real JavaScript to guide a drone through harder and harder levels. ARIA, the in-game AI mentor, helps them understand how to solve a problem instead of simply doing it for them.

Why the game and AI work better together

A coding game on its own can tell a player if they are right or wrong. An AI helper on its own can be too general. Together, the game gives the mentor the level, the learner's code, and what happened when it ran—so the help can match the exact problem.

Who it is for

New developers can learn in a friendlier place with support when they get stuck. Experienced developers can use focused challenges to practise skills they do not use every day, with as much—or as little—help as they choose.

03 / AI + cloud report

AI is useful when it is accountable.

This report records the AI used in the submitted product and during development. Paid figures below cover the hackathon period, not future-scale estimates.

Main cost driver

92%

R971.70 of confirmed spend was AI-assisted development tooling.

Product cloud spend

R0

Ollama Cloud and Cloudflare remained on confirmed free tiers during development.

total

R1,057.70

Actual development cost, separate from future operating estimates.

AI-assisted development

Two Claude Pro subscriptions and one ChatGPT Plus subscription supported implementation, level authoring, documentation, and prototype refinement.

Human control: The team made the decisions, tested the game, and reviewed every public claim.

ARIA mentor

An implemented Ollama Cloud mentor that gives contextual, next-step help inside the game and checks understanding after a successful solution.

Human control: Deterministic grading stays AI-free; guarded responses, budgets, caching, and scripted fallbacks prevent answer leaks and keep the game playable.

Hackathon actuals

What we paid while building this

ServiceUsed forCost
Ollama CloudARIA experimentation and cloud inferenceR0,00
CloudflareWorker, static delivery, and the KV-backed mentor cache during the hackathonR0,00
Claude Pro × 2Implementation, level authoring, and documentationR647,80
ChatGPT PlusImplementation, level authoring, and documentationR323,90
Domain registrarPublic project addressR86,00
Total development costR1 057,70

Claude Pro is calculated as 2 × US$20/month and ChatGPT Plus as US$20/month, converted at R16.1951/US$. Ollama Cloud and Cloudflare were confirmed free-tier development services; the domain registration was a one-time R86 cost.

How ARIA stays helpful

The game stays in control.

ARIA can explain a tricky moment, but it never decides whether a learner's code is right or wrong.

  • The game marks the answer

    Code is run and graded without AI, so results stay consistent.

  • ARIA sees the real attempt

    The server checks the code again and shares that result with the mentor.

  • Hints stay as hints

    Replies are short and checked so ARIA does not hand over a full solution.

  • The lesson still works without ARIA

    If help is unavailable, the learner gets a useful scripted nudge instead.

We checked these behaviours in the mentor test suite: 364 checks passed across 13 test files. We log runtime events, but will only report traffic once we have real traffic to report.

What the room marks mean

Passing a room and understanding it are two different marks.

Stars say the program ran inside budget. The line beneath them says what the learner showed when ARIA asked them to explain it — and every room starts by saying plainly that nothing has been concluded. A verdict that stopped short is not a life sentence: a learner who goes away and works the room out can ask ARIA to check them again, on a fresh set of questions. Only a confirmed one is final, because a mark you can re-roll until you like it means nothing.

No understanding determined yet
The default. Either the room has not been solved, or it has been solved and ARIA has not asked its questions yet. It is not a mark against the learner — nothing has been concluded.
Understanding not shown
The questions ran and the learner did not explain their solution. The room still opens — it was passed — but a passing program on its own says nothing about who wrote it, so nothing is credited. This mark can be answered: ARIA will ask again on request.
Partly understood
The questions ran and the learner explained some of their solution, but not enough of it. The room still opens, and a later room comes back to the same idea. This mark can be answered too.
Understood
The learner explained their own solution well enough, twice over, to a mentor that had already seen the code. Once a room reaches this, ARIA stops asking about it — including on a later replay, and there is no way to re-open it.
Not checked
A fifth, honest state: no check ever ran. The chosen mentor never checks understanding, or no model was available. The room unlocks on the passing run alone and claims nothing about the learner.

The limits, as configured

Every ceiling ARIA runs under.

The mentor has no config file: every setting below is an environment variable, so a deployment changes by setting variables and redeploying nothing. The non-secret values are committed to the Worker config and are what the live game runs on. The ones marked set per deployment are secrets, and are never committed.

Spend controls

Checked before every model call, cheapest layer first. Any breach routes to the scripted mentor rather than to an error, so a tripped limit degrades tone and never playability.

Mentor limit per level12 turns
Per player, per level. Counted from conversation state the client owns, so it is a courtesy limit rather than a security boundary.
Mentor limit per hour40 turns
Per player, per hour. In memory per isolate — a player's requests landing on different isolates is an accepted looseness on a courtesy limit.
Mentor limit global per day1,500 calls
The circuit breaker: model calls per day across everyone. KV-backed so every isolate counts against the same number — this is the one standing between the project and an unbounded bill.

IP-hash abuse tracking

A raw IP is personal data under the project's no-PII rule (ADR‑005), so these caps are checked against a salted SHA‑256 hash computed fresh per request and never persisted as anything else. With no salt set, IP tracking is off rather than faked with a reversible unsalted hash.

Ip hash saltset per deployment
Required in production. Without it both caps below are skipped entirely, leaving a single script bounded only by the global daily breaker.
Mentor limit per ip minute60 turns
A burst backstop below the hourly cap: it bounds the shape of the traffic, so a script cannot spend a whole hour's allowance in one instant. In memory per isolate, which is where a burst lands anyway.
Mentor limit per ip hour150 turns
Deliberately generous, and KV-backed so it holds across isolates. A classroom or an exhibit floor sits behind one address, and this must not turn twenty learners into twenty times one player's ceiling.

Per-browser identity signing

Each browser is given an anonymous random-UUID id in a cookie so the per-level and per-hour windows count per browser. A UUID names a browser, not a person, so this stays inside the no-PII rule.

Mentor id secretset per deployment
Signs the cookie, so a client cannot forge someone else's id to drain their bucket. Unset, the id is still issued but unsigned, and IP_HASH_SALT is reused for signing.

A denied call is never an error the learner sees: every limit above routes that turn to the scripted mentor instead, so a tripped ceiling costs tone and never playability.

AI development cost controls

Make every paid AI interaction count.

R971.70 of the R1,057.70 confirmed development spend was for Claude Pro and ChatGPT Plus. The next saving is not to remove AI from the workflow; it is to send the right information, to the right tool, in the smallest useful shape.

Start with a compact task brief

Name the goal, affected files, constraints, and acceptance checks before asking. This avoids replaying the same repository context and follow-up clarifications.

Keep memory useful, not exhaustive

Carry forward decisions, open questions, and test results as a short summary; do not repeatedly paste whole conversations, files, or build logs.

Use code for deterministic work

Builds, tests, formatting, calculations, and validation run in the toolchain. AI is reserved for design judgement, explanation, and genuinely ambiguous work.

Right-size the tool and the team seats

Use lighter or free-tier tools for simple tasks, reserve paid reasoning tools for complex work, and review named subscriptions after each delivery phase instead of keeping inactive seats by default.

We will track the task type, tool used, time saved, and outcome for future work. That lets us reduce subscription and model spend based on evidence rather than guesswork.

Every code run is free

The learner's browser runs and grades code deterministically, so routine play never creates a model request.

Savings are measurable

Cache-first routing avoids repeat model calls. Model-call, cache-hit, and fallback events are recorded so usage can be audited.

The budget has a safe failure mode

Cache-first routing, rate limits, a circuit breaker, and scripted fallbacks keep the game usable even after model calls stop.

04 / How we use AI

AI helps learners think. The game checks the answer.

The game uses fixed rules to check code. AI is only there to offer a helpful question after a learner has tried a level.

AI during development

  • We used AI to help build the app, write levels, improve the documentation, and refine the prototype.
  • The team still makes the decisions, tests the game, and checks every public claim.
  • We are clear about this: using AI to build the project is different from using AI inside the game.

ARIA, the in-product mentor

  • It asks contextual questions about the learner's code and the drone's behaviour, using the game's own deterministic grading report.
  • Six selectable mentor personas, including No Help, let learners choose the amount and style of support.
  • Guarded model output, a response cache, rate limits, a circuit breaker, and scripted fallbacks keep help safe and available.

The game decides what is correct

Stars, results, and error types do not depend on AI.

Hints do not give away the answer

ARIA asks what to try next instead of solving the level for you.

AI is only used when it helps

Personalised mentor turns are the only part of play that can add an AI cost.

05 / How we built it

We built the game around one simple idea.

We wanted to make the move from blocks to code feel natural. This is the short story of how the project grew.

  1. 1

    The insight

    We focused on the moment blocks disappear. Our answer was one drone and one set of commands all the way through the game.

  2. 2

    The engine

    We built an engine that runs the learner's code, checks it fairly, and lets them replay what happened.

  3. 3

    The ladder

    The prototype grew to 54 playable levels across nine decks, from blocks to data structures and algorithms.

  4. 4

    The learning loop

    Practice mode gives learners another way to find the topic they need, and saved progress lets them come back later.

  5. 5

    The mentor

    ARIA is part of the game: it gives contextual Socratic help, offers six mentoring styles, and follows a successful solution with an understanding check.

06 / Costs

Future costs stay predictable by design.

The confirmed development cost is reported above. These estimates show which costs can grow with future usage, without mixing forecasts into what we actually paid.

Scale explorer

See the path to 1,000,000 users

10,000 users

10k1m

Select between 10,000 and 1,000,000 monthly active users.

Planning assumption: 20 ARIA requests per active user each month, spread across 30 days. Workers costs are estimated separately from AI capacity.

ARIA requests/month

200,000

Cloudflare Workers

R0,00/month

Within the daily free tier

Ollama Cloud

R323.90/month*

Planning baseline; capacity must be measured

Daily Worker requests

6,667

100,000/day free-tier benchmark

* R323.90 is the Ollama Pro entry-plan baseline, not a guaranteed capacity quote. The confirmed development cost is reported separately above.

Ollama AI cost at scale

Explore the AI planning assumptions and hosted-capacity thresholds.

Monthly usersARIA requestsPaid-cloud outlookProduction decision
10,000200,000R323.90/month Pro plan†Benchmark throughput and token use
100,0002,000,000R323.90/month Pro plan†Measure before committing capacity
1,000,00020,000,000Custom / volume pricingRequire a hosted-capacity quote

† Development uses Ollama Cloud's confirmed free tier. It is not a capacity guarantee at production scale. R323.90 is the current US$20/month Ollama Pro entry plan, converted at R16.1951/US$; included cloud usage is model-dependent and limited, so it is not a 1m-user capacity quote.

Cloudflare cost at scale

View the request-volume assumptions and Workers cost breakdown.

Monthly usersHint requestsAverage requests / dayFree-tier fitWorkers / month
10,000200,0006,667YesR0
100,0002,000,00066,667Yes — below 100,000/dayR0
1,000,00020,000,000666,667NoR129.56 minimum; R134.10 incl. CPU

How the estimates work

Assumptions, safeguards, and the 1,000,000-user calculation.

1,000,000-user Workers breakdown

Workers Paid includes 10 million requests (R83.82). The next 10 million requests add R48.59, for a request-only total of R129.56. At Cloudflare's cited 2.2 ms average CPU usage, the estimated CPU overage is R4.53, making the estimated Workers total R134.10/month. See the Ollama table for the separate AI scaling basis.

How we keep costs down

  • The game runs and checks code on the learner's device, so each attempt is free.
  • Levels are simple files that can be delivered quickly without a database lookup.
  • ARIA checks saved responses first, has limits, and switches to scripted help if they reach a set budget.
  • AI is saved for helpful hints, not everyday answer checking.

07 / How it works

The game loop stays the same as the levels get harder.

Learners keep using the same drone and commands while they learn more advanced ideas.

How a level works

Write

blocks or JavaScript

Run

one drone engine

See what happened

grade + replay

Learn and move on

learn + advance

ARIA offers contextual help after a learner asks. It never marks the answer.

Learners express a solution in blocks or JavaScript. The same drone engine executes it, deterministic grading and replay reveal the result, and the learner advances through the next challenge. ARIA offers bounded help after a learner asks and never judges a solution.

08 / Tech stack

The main game runs in your browser.

Escape Sequence uses React, TanStack Start, and Vite. It is hosted on a Cloudflare Worker, while the game itself runs on the learner's device.

The technical path

Cloudflare Worker

hosts the app and levels

React app

TanStack Start + Vite

Game engine

runs code · checks it · replays it

localStorage

drafts + progress

ARIA mentor is available with guarded model calls and scripted fallbacks.

The app and levels load from Cloudflare. The browser runs, checks, and replays code, then saves progress on the device. ARIA adds optional, guarded mentor help, while the game still works without a model connection.

Language

TypeScript

What you see

React · Blockly · CodeMirror · Three.js

Look and feel

Tailwind CSS · Radix UI primitives

Game engine

JS-Interpreter · Acorn · fair, repeatable grading

Checks

Vitest · TypeScript checks · ESLint

Mentor safeguards

ARIA · KV cache · scripted fallback