Code Combat: Wield JS, Slay Orcs, Get Jobs!

CodeCombatNever has Javascript been more fun to learn. A startup venture backed by Y Combinator wants to teach you that language you’ve always wanted to learn through gameification – or the usage of elements of game design(e.g., point scoring, competition with others, rules of play)- to enhance motivation and the learning process. Slay orcs and battle minions by programming your units in a real-time web game. Compete against your friends to see who wrote the more robust code. Possibly get a job for your efforts?  Welcome to CodeCombat.

 Getting Started With Code Combat


The game has 8 levels that are rated at the 1-star difficulty, that are designed to teach you the basic premise of the site, the user interface, and the formatting of Javascript code.  On the left, you have the game engine, rendered in real time, where you are a wizard, controlling an army of soldiers and artillery with your spells of code. On the right, you have a notebook-style code editor.  Code you write here controls the movements, attacks, and playing of the overall game.  To complete the objectives in each level, you will have to write Javascript code, execute (or cast spell) and watch how your changes to the code impacted the outcome. Scrub forward or backward to any time in the program to replay what is happening when your code executes, including current values of all instance variables.

In the more intermediate levels, the challenges get more and more complex.  you begin to manage state flow, the mathematics behind Vectors, distance between targets, and rudimentary AI.  I played through the campaign levels that exist, as well as the user-created levels (they have a functioning level editor) and had a blast.  I have not focused on Javascript before, but am very familiar with Java. I found the engine well executed and that I was motivated to complete the challenges the game presented.

Compete With Friends In Multiplayer


In Multiplayer, you pick a race (Humans or Orcs) and a champion with special abilities, and then you sit down – to write your build.  You program in advance of the game the logic, strategy, and attacks of your army, which units you build, with the goal of overwhelming your enemy, and destroy his barracks. You do this before the game even starts. Once you save your build you test it by playing games against other people’s builds. The code executes as written, and the player with the best code wins ladder points. The best code will work against a multitude of strategies and adapt to the enemy without needing code readjustments.

Test your code against the best! Challenge the Ladder Leaders to see where your code stacks up.

How Will They Make Money?

Code Combat made it to the Y Combinator stage not because of their game or desire to teach programming while maintaining an open source community, but because of their business model. Code Combat asserts that it can keep the game fun and free to play by helping to place their best play/programmers into jobs at other companies.

Code Combat has unique metrics and insight into how you code: how fast, how accurate, how innovative, how efficiently… By taking the players writing industry grade code and helping place them at companies hungry for talented programmers, Code Combat takes a placement fee, establishing a revenue stream that seems like a win-win-win between companies, users and Code Combat.

Will they actually be able to get people jobs?

At the beginning of this year, YC partners challenged Code Combat to  test their assumption and find out whether they could actually get hirable players interested. They created a challenge level, called Gridmancer, with the title, “Beat this level, get a programming job”.  The challenge is one that Code Combat developers had to solve to release their game, which made it easier to grade, and a good test of programming know-how, and not just their ability to google.

In Gridmancer, you write an algorithm to cover the empty floor spaces in as few rectangles as possible. Code Combat solved this problem for both the pathfinding system and the collision handling optimization system. Their implementation did it with 33 rectangles, but they knew it was possible to do it in less.  They figured they would get a handful of submissions and place 2 individuals…

27,000 views, 3300 unique solution attempts, and 200 email submissions later, they wrote a blog post about how they graded the solutions based on identified number of rectangles, # of statements (as a proxy for efficiency), and tested how well the code performed on levels other than the Gridmancer level.  In all, the challenge solution may not have been as hard as they thought it would be for players, but they were still able to show some talent above the rabble by looking at the most elegant solutions submitted.

Code Combat has received a high amount of  interest from  employers so far, and some candidates passing their second technical interviews at the time of Code Combat’s last update, things are looking good for CodeCombat’s recruitment strategy.

Does Code Combat work as an Education Tool?

Code Combat participated in non-profit‘s Hour of Code project, designed to promote adding computer science to the core curriculum in schools and to encourage all students to try programming for one hour. Hour of Code really deserves its own post:

Every major tech company promoted it, celebrities talked about it, and even the US President helped get the word out in their kickoff video. And shooting past’s crazy target of ten million players, kids are still continuing to play this week, with 600 million lines of code written and one in five US schoolchildren participating (with six times as many girls playing last week than have ever taken a computer science class in the US). It spread to more students in seven days than the first seven months of Facebook, Twitter, Tumblr, Pinterest, Instagram combined.

24 tutorials were ranked by teachers for the Hour of Code event this year. Cod Combat joined the party a little late, but was ranked 18th. Many classrooms let the students pick which tutorial to do, and it seems students love games so much that every tutorial for playing or making games got far more traffic than it should have based on its ranking. So  Code Combat, the very last tutorial in the JavaScript section, ended up with 180,000 players–20 times what they expected based on their ranking. So although most teachers emphasize lessons, if they want to reach kids, it helps to do so through games.


The event is international – for 18 countries with more than 40 players beating the first level, students from ten of those countries were significantly more successful than the US and UK students, and students from six of them were much faster. Only three countries were either slower or less successful–and this being despite many of the game elements not being translated into the country’s native language!

Check Out Code Combat!

Code CombatI had a lot of fun, and I bet you will too.  I look forward to hearing more from them, seeing if they can successfully place top programming talent, and watching as they show millions of students how fun it is to build things with programming, which is ultimately what got me working in IT in the first place.



Sources not linked in post: Code Combat’s Blog

Please Please Please also go check out  What a great mission!

Posted in Inspirations, IT, Shifting Perspectives, Software, Technology, video games. Tagged with , , , , , .

Leave a Reply

Your email address will not be published. Required fields are marked *