I Built a Free Browser Game That Teaches Kids to Code in Python

Published: (May 10, 2026 at 08:16 PM EDT)
3 min read
Source: Dev.to

Source: Dev.to

My 10‑year‑old couldn’t sit through a Python tutorial. So I turned it into a dungeon crawler.

Last year, I tried teaching my kid to code. We started with a popular online Python course. By lesson 3 (“Variables and Data Types”), they had closed the laptop and were back on YouTube.

I don’t blame them. Most coding tutorials are built for adults with existing motivation. They assume you want to learn. Kids don’t want to learn — they want to play.

So I built SuperRobots – a free, browser‑based coding game with two modes:

  • Block‑Based Coding (ages 8+) – Drag‑and‑drop visual blocks to guide a robot through maze puzzles. No typing, no syntax errors, just pure logic.
  • Cyber Dungeon (ages 12+) – Write actual Python‑style code in a real code editor to navigate a 3D crystal dungeon, fight enemies, and defeat a final boss.

No accounts. No paywalls. No ads. Just open superrobots.org in a browser and start playing.

The Problem With “Learn to Code” Platforms

Most platforms teach coding like math class: concept → example → exercise → repeat. This works for motivated adults, but it creates a massive drop‑off for younger learners.

The real problem isn’t what they’re teaching – it’s why a kid should care. If there’s no immediate, visual payoff, they disengage.

Games fix this. When your code makes a robot move, shoot a laser, and defeat an enemy right in front of you, the feedback loop is instant. You’re not learning for i in range(5) – you’re figuring out how to blast five enemies without dying.

How It Works

The Block Game

Teaches foundational logic:

  • Sequencing – Stack commands top‑to‑bottom.
  • Loops – “Repeat 3 times” blocks to avoid redundancy.
  • Conditionals – “If path blocked, turn right” decision blocks.

The Cyber Dungeon

After internalizing these concepts visually, players move to the Cyber Dungeon and write real code:

# Move through the dungeon
super_robot.moveRight()
super_robot.moveRight()
super_robot.moveDown()

# Fight an enemy
super_robot.fire_laser()

The levels get progressively harder. By the end of the campaign, players are writing path‑finding algorithms and multi‑step combat logic – material that would be “Chapter 12” in a textbook but feels natural because they’ve been playing their way up to it.

The Tech Stack (for Fellow Devs)

  • Rendering: Three.js for the 3D crystal dungeon environment.
  • Code Execution: Pyodide (Python running in the browser via WebAssembly).
  • Code Editor: Ace Editor with syntax highlighting and error feedback.
  • Hosting: Static site on GitHub Pages – zero backend.

The entire thing runs client‑side. No server, no database. A kid in a rural area with a Chromebook and spotty Wi‑Fi can load it once and play offline.

What I Learned

  • Gamification isn’t a gimmick – it’s a pedagogical strategy. Immediate visual feedback reinforces abstract concepts faster than any textbook.
  • Kids will debug willingly when the stakes are “my robot died” instead of “syntax error on line 7.”
  • The block‑to‑text transition is the hardest moment in a young coder’s journey. Building a game specifically for that bridge (blocks → Cyber Dungeon) made it dramatically smoother.

Try It & Tell Me What You Think

superrobots.org

I’d genuinely love feedback from this community:

  • Is the difficulty curve right?
  • What features would make this more useful in a classroom?
  • Any levels feel unfair or confusing?

If you’re a teacher, parent, or mentor – share it with your students. It’s completely free and always will be.

0 views
Back to Blog

Related posts

Read more »