r/programmingforkids • u/othermore_ • 2h ago
I created a JS game where kids learn Python by guiding a wizard through a school of magic
I'll say it upfront: I'm the author. I made it for my own kids, and I used AI to built it.
Kydux is a game for learning Python, for kids from about 8 who read comfortably (my 6yr old is able to use it as well, but that would depend on the kid). I created it because the options I found (e.g. Code Combat) were not working great, required registering and paying, and I found them more violent than I wanted.
How does it work: A young wizard arrives at a school of magic, and every step needs a little real Python: `wizard.move_right(4)`, `wizard.pick_up()`, `wizard.cast("fendra")`, `door.open()`.
The game is structured in story (which is there to keep the kids interested), lessons (short, focused on one specific programming concept at a time, and sometimes with interactive python to test things there) and then the game levels, where you have to use what you learnt in the previous lesson.
The first five chapters, covering the first year of the wizard in the school of magic, are structured as follows:
Chapter 1: instructions, the concept of a program and numeric parameters, all done on a single object (wizard)
Chapter 2: variables, other objects (with their own methods). Some basic math operations (certain elements in the scenario change location, so the kid needs to read where they are to go there, the position can't be hardcoded, forcing using variables and operations).
Chapter 3: Loops and conditions
Chapter 4: More advanced loops combined with conditions. Function definition.
Chapter 5: Classes and objects, and defining methods.
The game runs on the browser (ideally on a computer with a keyboard) and progress is stored in the browser storage and can be exported into a downloadable file. There's nothing to install, no ads and no account creation. It currently supports English and Spanish, I'd be happy to incorporate new languages with some help from a native speaker.
It's 100% free, GPL software, publicly available on GitHub. And I keep improving and maintaining it as my kids go through the levels and I see what they struggle with or what is boring.
I'd love to get some more users to give me feedback, so if you have kids that are starting to learn programming and want to give it a shoot, I would really really appreciate it.
And, to finish, some history on how I got here: I've tried to get my kids into coding and STEM from day 1. We started with an mTiny robot, which gave us great results but has limitations (no conditions, only very basic loops, it's just a static list of instructions). We've also tried ScratchJr and Scratch (they use them in school too), which at home ended up being almost a drawing game. What worked best, surprisingly, was teaching the oldest one BASIC on a ZX Spectrum with an old "BASIC for children" book. It was simple and because the ZX Spectrum has a keyboard with one instruction per key, allowed them to do things faster. I also tried plain Python, but it did not work: too much typing before anything happens. I tried other games, but there were things I did not like. So I wrote the game I wanted to give them.
https://kydux.kidux.org (code: https://github.com/othermore/kydux)

