X

Code Combat teaches you to code through dungeon-crawling

Browser game CodeCombat teaches you how to code in Javascript by having you input the commands to play a game.

Michelle Starr Science editor
Michelle Starr is CNET's science editor, and she hopes to get you as enthralled with the wonders of the universe as she is. When she's not daydreaming about flying through space, she's daydreaming about bats.
Michelle Starr
2 min read

Browser game CodeCombat teaches you how to code in Javascript by having you input the commands to play a game.

(Credit: CodeCombat)

Looking at a bunch of code for the first time can be something of a daunting affair. All those strings and symbols simply look like a mess to the untrained eye, and can be a bit off-putting to anyone who's toying with the idea of learning how to code. However, it's not nearly as difficult as it looks — if only one can find the right delivery method.

Codecademy does a pretty good job, but one group of programmers wanted to make it a little more accessible. Enter CodeCombat: a browser-based game where your in-game actions are dictated by the Javascript code commands you type.

George Saines, Scott Erickson and Nick Winter, who wrote Japanese and Chinese written language-learning app Skritter in 2008, launched the game last year. It was actually born of the Skritter experience: when making the app, Saines got frustrated with his inability to make his ideas come to life, and at the same time observed his housemate growing bored of Codecademy. The problem, Saines realised, that slow, methodical lessons weren't always as effective as putting those skills into practice.

"Need to learn to code? You don't need lessons. You need to write a lot of code and have a great time doing it," the team writes on their web page. "That's what programming is about. It's gotta be fun. Not fun like 'yay a badge' but fun like 'NO MOM I HAVE TO FINISH THE LEVEL!' That's why CodeCombat is a multiplayer game, not a gamified lesson course. We won't stop until you can't stop — but this time, that's a good thing."

Each of the game's levels has you coding towards a specific goal — collecting a mushroom so that you grow strong enough to beat a giant ogre, for instance, or leading soldiers to do battle, or escaping from a dungeon. Each level is also given a difficulty rating out of five stars — the hardest being the dreaded Gridmancer.

And there's always more on the way. The project went open source last month and, since then, programmers have been contributing with bugfixes, pull requests, upgrades and patches to keep the levels ticking along. This is a good thing — the game can get a little buggy from time to time. Not enough to interfere with functionality, but enough that it's most certainly noticeable. It seems to work best in Chrome.

The game is free to play, and anyone can jump in and have a go. Be warned, though, it won't be holding your hand: you have to figure a fair bit out for yourself. But hey — maybe you'll learn better that way.