Code Combat: Learn to Code by Playing a Game

This week is Computer Science Education Week, a time to spread the word to kids everywhere that computer science is a subject worth learning. encourages teachers to host an Hour of Code for  kids to learn the very basics of programming in one hour — no experience necessary. I am excited to be hosting several events at my local libraries. Here’s where the review comes in: for the event, you can choose from several different activities. I choose for the kids to use a game called Code Combat, which is what this post is all about. Here’s the catch: instead of getting to play the game, they help make it.

Getting Started: Several Language Choices

You can start playing Code Combat right away, without making an account. You’ll have a choice between a female and male character and the programming language you’ll be coding in. The choices are Python, JavaScript, CoffeeScript, Clojure, Lua, and lo. They give a nice, brief explanation of each language in the game. You can also change the language at any time in between levels, and you may repeat levels again in a different language.

“Playing” the Game

To play Code Combat, you enter code instead of pressing the direction keys to move or buttons to attack. Instead, you must type the method. Each level has several mini-goals. To receive the most gems (the in-game currency used to buy weapons and equipment), you must complete them all. The goals are usually split between completing the level and using the most efficient algorithm, to solve the puzzle. This is unique to many educational games in that it is actually fun, and not just by my adult standards. The group of kids I taught with this continued to play long after the hour was over, which is a true testament to the game’s entertainment value.

Is it really an effective way to learn?

Yes, yes, a thousand times yes! Will you learn everything you ever need to know about programming? Of course, not. However, this is a great way to pique interest and teach the basics. It’s aimed towards middle school kids, but if someone told me to play this during my first quarter of computer science as an undergrad, I would’ve learned just as much from it as I did in my first few weeks in class. The first portion of the game covers important programming ideas such as methods, variables, and loops. The nature of the game encourages forward thinking, much like coding a real program would. It also shows how to debug the code, a VERY important thing for future-programmers to learn.

Code Combat can be played in any browser. A significant portion of the game is available for free, but after completing many levels, they do ask for a subscription. You can learn a great deal before hitting the wall.

Visit to start coding today!


Enter your email address:

Delivered by FeedBurner

Shaila Lias

Lover of apps, books, mocha and games.

View more posts from this author