When I grow up I wanna be….

When I grow up I wanna be….

The day has come, the world has changed and I feel like I belong in a museum. A new generation of tech savvy youngsters, with a greater understanding of the technical world than their parents, use tablets, mobiles and computers to advance their education at a faster rate than ever before and many learn coding fundamentals through games from as young as five! Gamification is a very diverse market, targeting different age categories from primary school children through to secondary school and adults. There is far too much to cover in one post and do any of the apps justice, so this will be the first in a series of reviews of the platforms out there and what they can do to give your children a head start in life with code (or if you’re like me, a catch up).

So without further ado, I’ll introduce the first program we’ve explored…

Code Combat 2

Using a familiar and welcoming RPG (Role Playing Game), mixed with a cartoon world and characters, Code Combat instantly feels like a game anyone can recognise. When starting the game, there are options for the level of education you have, and the game estimates the time required to complete the number of levels currently available. These range from 50-70 hours for primary school, middle school 25-30 hours and high school 22-28 hours. Don’t be off by these categories, as despite the average user being aged under 14, people over 45 are also enrolled. The biggest difference is that by being a bit older you might hope to complete it faster. I haven’t felt restricted to stick to the plan entirely and always try to push what I’ve learned further to complete the levels even better.

Code Combat 3

The game itself follows the story of your hero moving across different worlds or areas, escaping danger, collecting gems and fighting beasts. The game displays on the left side of your screen and the code editor on the right.

Code Combat 4 

Using the editor, gamers are required to write logical and accurate code to interact with the avatar. If your code is incorrect, your avatar is helpless and (depending on your instructions) will run around or stand still until their eventual death. The game uses a traditional evolutionary path where the hero becomes more advanced as they progress through the story.

Initially your hero is armed with no more than the ability to move. The command for this being hero.move with a direction e.g. hero.moveUp();. As his gear enhances, he gains more precise movement abilities, attacks and defences such as hero.moveXY(32,22);. This provides him the ability to move to exact co-ordinates on the map in order to avoid obstacles. As I mentioned before, I tried playing beyond the guide and so tried ideas such as:

while(true) {
 var enemy = hero.findNearestEnemy();
 hero.moveXY(enemy.pos.x+5, 23);
}

Not the bravest of moves, as this meant I was running away to not take any damage whilst waiting for my AOE (Area Of Effect) attack to charge, even though the avatar had enough health to survive. The best coders are restricted in some ways as the avatar’s gear (armour, weapons and trinkets etc.) determine what functions are available. I like that a lot of the commands available are symbolised by spell books and magical devices. When a player tries to do something without the prerequisite gear, they will encounter error messages such as:

Code Combat 5

CodeCombat begins with a smooth learning curve well suited to players with no coding experience and remains engaging through each of the levels. For those who are a little older and wiser, the constant hints and advice over-simplify it a little. Coupled with the contextual guidance on each of your gear items and the start of level guidance means that no-one should be lost or incapable of playing a level. (For those of you who aren’t familiar with coding, putting // at the start of a line is one of the ways to turn the line into a comment which the program will ignore).

Code Combat 6

Code Combat 7

Code Combat 8

When Code Combat turns into Combatting the Code

I’m thoroughly impressed with the Code Combat offering, despite a few issues.

Coders have access to a range of languages: Javascript, Python, CoffeeScript, Lua and coming soon Java (completely different to Javascript), but not all levels are available to everyone. I’ve completed every level available to me in zone one, which sadly only equates to nineteen of the forty-one levels.

Code Combat 9

The rest are available only through paid subscription. A range of avatars are also unlocked by completing levels, although from what I can see these are limited to levels which are not available to me.

Code Combat 10

There is also a degree of complexity in actually starting the game if you’re not registered with a school. You sign up, log in and are presented with this screen, with no indication about how to play the game.

Code Combat 11

To play Code Combat without a school subscription, the game is accessed by going to this URL: http://codecombat.com/play.

The Biggest Issue

About 20 levels into the game, I was suddenly hit with this error: 

Code Combat 12

What this means is that the console isn’t recognising your hero. As I have only tried the Javascript version of the game, I can not attest to this being an issue in the other languages. Either way, this is an issue that is beyond the capabilities of anyone playing this game, the solution is simple (and you will need it for every level). Just add the following line at the start of your code and everything will function as intended:

if (typeof hero === ‘undefined’) var hero = this;

Solution by Trotod.

Can CodeCombat declare this game a victory in educating aspiring coders?

The app is truly engaging and fully meets the gamification requirements of a modern day game. The gear options add a level of strategy to the game making you think about your choices to ensure you have the tools for the job.

It is important to note that this will not teach someone how to create working websites or apps. They are the fundamentals to understand how to talk to a computer. Think of it more like learning a language using flash cards. You will get a foundation but you wont be fluently chatting with a native speaker.

All in all, it’s a wonderful introduction for budding coders as you get an interactive and fun tool to learn with, and a massive improvement on the traditional dry text that can disillusion many people before they are experienced enough to start enjoying the art of coding. 5,000,000 people have played, across more than 200 countries and 50 languages, writing more than a billion lines of code. My advice: join in and keep up with a rapidly evolving technical world.

Stephen Collins