Monday, January 16, 2012

Code Hero (beta 0.18) - The Road to Becoming a Master Programmer is Paved with Bugs

2/28/12 Updates about Code Hero here!

Format: PC/Mac

Est. Retail Price: $31.37

Beta Release: Dec 1, 2011

Target Age Group: 6+

Developer: Primer Labs

Genre: FPS, action-adventure, text-based

What kids will learn: Ideally, they learn the seeds of programming in JavaScript and UnityScript, but the beta build of Code Hero is currently a lesson in good intentions gone bad.  Gameplay is uninspired, bug-filled, and not nearly as conducive to learning programming basics as a good book or free online tutorial.  Code Hero has a long way to go before it can stand alone as an educational tool.

Experiences of a Playthrough

"Code Hero can teach a total beginner how to code from zero to hero. No experience is required. Prepare to amaze yourself."

Code Hero is a project that simply oozes with ambition. Learn how to write code and make your own games by playing a game! It's a promise that's generating a lot of buzz in both the business and gaming worlds, so when the beta release became publicly available, I jumped at the chance to try it out. But like so many things that sound too good to be true... well, you know how that one goes.

There can never be too much neon yellow in cyberspace!
On the surface, Code Hero has all the appearances of a typical first-person sci-fi action-adventure game: players begin in a sparsely decorated office, where they discover an iPad-like device that quickly pulls them into the world of code.  Unfortunately, this digital, code-filled world looks rather like the films Tron and the Matrix had some monstrous love-child, but I was more than willing to forgive the unimpressive art direction if the game could even partially fulfill its sensational promises of making me a coding powerhouse.  So, armed with a "code-gun" that allows players to copy examples of code that they find throughout the world and then shoot it back at various interactive objects in the game, I plunged in.  With all the promises attached to this unique take on an Application Programming Interface (API), I was ready to be both challenged and amazed.

And I was quickly amazed, although for many of the wrong reasons.  The main hall where players make choices about what scripting  language or challenge they'd like to work on next is jam-packed with enough glowing neon pillars to make Time's Square and Tokyo's Shibuya Crossing look tame by comparison.  Situated at the center of this blindingly bright, Hackers-inspired virtual lobby is a transparent dome that holds in suspended animation a creepy Ada Lovelace avatar who unfortunately looks a bit more like a digital blow-up doll than like an inspirational code-pioneer.  Presumably, Ada will one day offer new adventurers advice about where to go and what to do (her mouth disconcertingly waggles as though she's been primed for speech), but in the build I played (beta version 0.18), players are left entirely to their own devices about deciding how to proceed.

Wandering around this lobby, it quickly became apparent just how much remains to be completed before Code Hero gets a final release. There are several doorways for players to chose from, some with more descriptive labels than others.  Tucked away in some not immediately noticeable spots are doorways with labels like "Nexus" and "Platform."  Entering these reveals several incomplete areas.  Some contained curious easter eggs, like the room hiding Charles Babbage and his Analytic Engine.  But mostly these rooms are just incompletely formed.  In one area that I could not otherwise escape, I was able to walk through a wall and fall out of the game world entirely.  In another, touching a glowing portal triggered a  game-crashing bug.  Whether these rooms are expected to someday contain wholly independent game features, or if they are just storage lockers of sorts for elements that haven't been incorporated into the game proper was unclear.  Still other inaccessible doorways appear to be place-holders for tutorials that the game intends to support, like HTML5 and regular expressions.  The only "complete" areas are those accessible via the three most prominently placed doorways, two of which lead to tutorials for the game's two main scripting languages UnityScript and JavaScript. The third doorway, labeled "FizzBoss," was marked with an ominous oversized Space Invader and a warning indicating that players should not enter until they know Javascript.  Yet, even within these rooms, much is still under construction.  In the rooms for UnityScript and JavaScript, only a small part of the tutorials were complete (1 of 5 for JavaScript and 2 of 9 for UnityScript).

Expect to spend a lot of time plodding through lessons
on this unintuitive console as you learn JavaScript basics. 
Even though the game gave me very little direction about how to proceed, the overall lack of completed areas made my decision much simpler.  I decided to start with the first JavaScript lesson, since I at least knew that I would need this to succeed in the FizzBoss room.  At last, the learning would begin! The Javascript room contained a large display screen and some stacks of colored blocks.  As I approached the computer screen, instructions appeared.  I follow instructions and dutifully enter some code.  Click.  More instructions.  More coding.  Click.  More instructions. More code.  Click.  Repeat ad nauseum.  So much for a game, or for the developer's claims that "learning happens naturally [sic]."  Here I was, ready to unleash some havoc on the 3D world around me with my awesome code, and instead I found myself spending 20 minutes with a console that acted primarily as an interactive textbook.  Worse, I found these lessons to be quite buggy and at times even incapable of catching errors in my code.  The lessons did at least convey some JavaScripting basics, but so far, I wasn't seeing anything either fun or innovative about these tutorials.

Fortunately, I'm somewhat familiar with JavaScript already, so I was pretty easily able to complete the entirety of the lesson.  I was now "a hacker on the road to code mastery," the game told me.  Once again, however, it conveniently forgot to give me directions to the next town on the way.  Despite the achievement, of successfully completing the last JavaScript challenge, no new levels or doorways opened and no signs appeared telling me where to go and what to do.  It was as if I hadn't bothered with the tutorial at all. The lesson simply ended. With no real feeling of progress made and with no better options presented, I grumpily trudged back to the main lobby and wondered again what I ought to do.  Bored and unimpressed with the drab JavaScript tutorial experience, I headed to the FizzBoss room.  "JavaScript knowledge required beyond this point," warned the sign outside.  "I know this!" I thought.  "Heck, those lessons were easy.  I should be totally prepared!"  Unfortunately, Code Hero once again disappointingly defied my expectations.

Beware, children! Jilted at the altar, Policewoman Ada now 
lurks inside your computer, waiting to swallow your soul.
Sadly, before the FizzBoss challenge even began, I ran into some nearly game-breaking bugs in the "mission briefing" area: the instructions blazed across the screen in an instant and then disappeared entirely, leaving me with no idea what I was supposed to do.  Another stern-looking Ada Lovelace figure stared unhelpfully at me, refusing to offer me any aid.  It seemed I had no choice but to enter the room and see what was up. Initially, I was filled with a rush of excitement.  At last, I had finally found something that looked like a game!  A hoard of 3-dimensional Space Invaders floated across the sky, dropping little electronic bombs at me and menacing my home base. I had to stop them!  But how?  Unfortunately, I had no idea.  The lack of instructions made this area impossible to solve.  I tried using code that is preloaded into the code gun for destroying game objects, and was able to shoot down some invaders,  but not only were there too many to take out one-by-one, but several invaders were immune to my weapon.  Time after time, the invaders would either zap me with their bombs, or reach my home base and force me to start over.  My efforts to stop them were futile and disappointing.

Completely unable to stop the Fizz Bots in the FizzBoss challenge, I eventually decided that some backtracking was in order, so I returned to the lobby and sought out the UnityScript tutorials.  In the UnityScript tutorials, the player at last gets away from the text-heavy console that dominated the JavaScript tutorials and begin learning to manipulate objects in the environment.  You copy code into your code-gun that makes platforms and other objects move: up, down, and along the z-axis.  You learn how to create shapes and how to destroy them.  You learn how to get to out-of-the-way places to collect shiny gold stars (although there was no apparent reward for doing so).  In all, it at last started looking like some kind of a game: overcome obstacles and get rewards.

But just as with the JavaScript tutorials, the UnityScript tutorials ultimately provided little sense of purpose or progression. Sure, it was briefly entertaining to create objects and make my own macaroni-art against the game walls, but I still didn't feel like I was playing much of a game.  Why was I practicing building stairs when there were no secret areas that to explore that seemed only accessible by stairway?  What good does it do to know the position of an object in the game world if I don't need to build anything?  In short, the tutorials seemed to assume that you should learn these things for the sake of learning, which may be a fair assumption in an educational game.  However, if players are already that motivated to learn programming, why play Code Hero at all?  Why not just download Unity and start building their own game world right away?  Better tutorials exists online than the tutorials presented within the game, and they're free.  Why pay developers to put a cumbersome interface on well-documented scripting languages if their only target audience is motivated learners? Cruel thought it may sound, the more I wandered through the world of Code Hero, the more I felt like Code Hero had utterly failed to justify its existence.

Look!  Up in the sky!  It's a bird.  It's a plane.  It's Fizz Bots!!
As my disappointment and disinterestedness grew, I decided to take one last crack at the FizzBoss challenge.  Having fully explored every tutorial available to me, it was clear that I should be adequately prepared to blow these Space Invaders out of the sky.  Once again failure.  And again.  And again.  What was I missing?  Was the game really so unintuitive that it was impossible to complete without viewing the mission briefing?  After all, the point was simply to destroy the invaders, and I knew (or thought I did) how to destroy game objects.  So why did I find myself restarting over and over again, each time feeling like I was still no closer to destroying these dastardly Fizz Bots?  I think part of the answer is that Code Hero expects a heck of a lot out of players who have ostensibly only just gotten their feet wet with coding.

A Fundamentally Flawed Approach?

While the developers at Primer Labs are obviously saavy programmers, my impression from playing Code Hero is that they are not nearly so saavy when it comes to understanding game design fundamentals. Ultimately, I felt that Code Hero, as a game, simply wasn't fun.  What I consider to be three of the key pillars of good game design--reward, progression, and challenge--are all three largely absent from Code Hero.

My first disappointment is that there simply are no rewards in Code Hero.  Sure, the satisfaction of printing "Hello World!" on the screen is something of a reward, but that's a reward that's inherent to coding (about which I will say more below).  Within the game itself, there are no achievements to earn, no points accumulated, no in-game currency to collect, there are no exciting new levels to be reached, no stories to complete, no princesses to save, and so on.  With the exception of some gold stars which players can pick up, but which have no apparent value and are not visibly tracked, players don't feel any motivation to proceed.  The tutorials are about as motivating as taking a quiz in school--players do it because it's expected of them, not because they are rewarded for completing it.

Code Hero is also lacking in sense of progression in two key ways.   The first, which I've already mentioned above, is that ongoing feedback on progress through rewards and other visual tokens of success within a stage, quest, or level.  This kind of progression is useful for motivating players to continue playing the game and even to repeat playing a game or level to improve their performance.  Without this, players feel little incentive to complete in-game tasks if they aren't rewarded or don't seem necessary to completing the game's objectives. But the second sense of progression, which is arguably even more crucial for an educational game than the first, is that sense of mastering a skill and moving on to the next level or challenge.  On a neurological level, these kinds successes are the most crucial for cueing our brains to reinforce the new pathways its just created.  And yet Code Hero give players little opportunities to experience the positive feedback of "leveling up,"nor does it give players satisfying indications of in-game achievement.  For example, even when players manage to figure out the code needed to destroy all the Fizz Bots in the final challenge, one click of the mouse execute the code and the Fizz Bots instantly disappear. While this is accurate in the sense that the code that removes these 100 Fizz Bots is executed so rapidly that to us it appears that the Bots were all removed instantaneously, from the perspective of a player of an educational game, this makes the player's success virtually invisible!  Instead of executing successful code in real-time, why not have an animation that slows the code down and highlights which enemies are destroy by each particular part of the code?  Give players that important visual cue and that little jolt of dopamine that tells them, "excellent work!  Now you're ready to move on to something harder!" But with that cry for more challenges comes a caveat...

Don't think like a programmer in developing the early challenges!  This may sound like a specious complaint, but I think it actually speaks to a critical weakness of Code Hero.  The key to making a game like this a success is in balancing the challenge level throughout.  Challenges, if they are to be rewarding, have to be neither too easy, nor too difficult.  But what is challenging in the mind of someone who is already quite competent at programming one who has no experience with it are fairly different things,   and Code Hero, in my opinion, misjudges where the level of difficulty should be.  The tutorials on JavaScript and UnityScript were fairly straightforward, to the point of being too simplistic.  Instructions were not always as clear as they needed to be, and there's virtually no feedback to help players diagnose problems with their code, but for the most part, the concepts were not especially tricky. This stands in stark contrast with the FizzBoss challenge.  While the basic concepts in this challenge were mostly covered by the tutorials, there are little adaptations to the syntax that players must make, which would be largely impossible for a novice programmer to deduce or intuit.  For example, players learn about writing loops of code in the JavaScript tutorial, so they'll likely guess that a "for loop" will help them  in eliminating multiple enemies.  They'll most likely write something like the following:

for (i=1; i<=100; i++) {
   GameObject.Destroy (GameObject.Find(i));

This most closely resembles what they've learned from both the JavaScript and UnityScript tutorials.  But it won't work when they run the program.  They'll shoot their code-gun and nothing will happen.  They'll check the console and see the following error:

How many novice programmers could look at this and know what's wrong with their code?  How would they figure out that they cannot try to Find(i) because i in this context is an integer, and Find() needs to look for a string?  Would they know that they way to convert the integer i  into a string i is to write i+""? This is what the correct version of that code should look like:

for (i=1; i<=100; i++) {
   GameObject.Destroy (GameObject.Find(i+""));

For non-programmers, I realize all this code may seem like a confusing digression, but my point is merely this: I believe Code Hero fails to appreciate one of the majors reasons coding is so difficult for complete beginners: the syntax is very particular and often confusing.  And Code Hero, for all it's heart and determination to make coding fun, can't do much to help inexperienced players get past this hurdle to entry.  The console gives players only the typically cryptic messages of most debuggers, which does little to help "newbs" troubleshoot their code.  Add to this the ridiculous time constraints of the Fizz Boss challenge and the fact that players will be expected to restart repeatedly even if their only error is a misplaced semi-colon, and you're left with a "game" that creates far more obstacles to learning code than it overcomes.  

Final Thoughts

In the end, I really wondered what exactly Code Hero was about. When I imagined what an educational game about a code hero, armed with a code gun, would look like, I pictured players gradually learning little bits of code and then using that to manipulate their environment more and more by writing new code and shooting it into the world.  Need a door?  Write code to create a door!  Need a block to climb an obstacle? Code a new block and inject it into the world!  In other words, I pictured something like a combination of Portal and Scribblenauts, where each level the game world was surprisingly malleable and the number of potential solutions to puzzles were limited only by the player's imagination and ingenuity.  Of course, I realize it is hardly fair to fault Code Hero for not meeting my very specific and very high expectations, but I thought a huge opportunity was missed when the challenge of learning new code was not "rewarded" by the ability to blaze unexpected paths through game levels.  Even more disappointing was the fact that Code Hero utterly failed to convince me that I was actually playing any kind of game at all.

Despite being marketed as a beta release, the Code Hero I played was more like a buggy prototype of a game still in the earliest stages of development.  Only the introductory levels were available, there was no save or continue feature, many of the JavaScript tutorials seemed broken, and the final battle was mostly unplayable due to glitches in the instructions.  All of these flaws combined gave me the strong impression that the "game" I was playing was not really a game at all, but merely a proof-of-concept.  It makes sense to make a proof-of-concept demo available while they are in the middle of a fundraising campaign, but why they would tout this as being anywhere near a beta release is beyond me.  In my opinion, doing so only hurts their credibility.  Do developers really think their product is near complete? If so, I would say that this doesn't bode well for the final quality of the game. Or have the developers instead put too much priority on marketing while the game itself is still woefully underdeveloped? Should they really have a shiny mock-up of the game packaging already worked out, when the game itself is tragically flawed?  In today's crowd-source funded indie gaming world, I understand that marketing is more important than ever, but alas, promises and a slickly-designed website do not a good game make.  Too much marketing hype and promising more than they can really deliver can easily come back to burn the unwary developer.

I'll create GUI interface using Visual Basic.  See if I can
track an IP address... or maybe I'll create Code Hero instead.
Only time will tell if the developers at Primer Labs will be able to assemble the disjointed pieces of Code Hero into a coherent and enjoyable final release.  Clearly, much love for computing has been poured into this project already, and there's no reason to suspect that they're at all ready to give up.  But my biggest fear about Code Hero is that the basic gameplay prototyped in this beta build is simply not fun. The 3D world currently makes for a poor interface between players and the code that they are trying to master.  In many ways, the Code Hero I played felt like it was the real-world embodiment of that laughably bad scene from CSI:NY, where the detective suggests building from scratch a graphical interface that's completely irrelevant to the task at hand.  Unfortunately, Code Hero strikes me as being analogous to that completely superfluous GUI interface.  It attempts to put code-building into a shiny, 3D environment, but to little end.  Its compiler is not yet robust enough to really help players learn where the flaws are in their code, the tutorials are not flexible enough to recognize multiple solutions to the challenges it poses, and the first-person perspective on an unsightly and disorienting 3D environment simply creates an additional chore for players.

The cyberpunk style and themes would probably make William Gibson and the 
Wachowski brothers very happy, but the frustrating play will be a turn off for novice programmers.
I so desperately wanted to like Code Hero and all its promises of excitement and innovation. I wanted to be blown away by a game that went beyond being a simple guided textbook and instead created an immersive 3D world that brought to life all of Hollywood's cheesy visualizations of the heroic hacker in action. I expected I would get the chance to become a Super Mario of Code, programming my own power-ups and reorganizing the game world to favor mustachioed plumbers over sour-faced goombas. Unfortunately, that fantasy game is not Code Hero, and right now, Code Hero doesn't look like it could be anyone's fantasy game.


  1. I have been exploring 'beta' .192 myself. The game is still extremely rough, however there is a unity script area on transformations which was clean and fun. Although not very difficult - it did however do a good job at combining game and code elements, changing position of in game objects and traversing the 3d space with them.

    I think there is a lot of potential in this game, but it feels like it still has a long way to go.

    1. Thanks for your thoughts, GameCarpenter. I agree with you completely. Lots of potential, but currently unrealized. Hopefully with the success of their Kickstarter campaign, we'll see much more out of Code Hero. I'll definitely be keeping an eye on this one and updating here.

  2. AnonymousJune 12, 2012

    I read with much interest this review of Code Hero. I am a newbie and experienced all of the frustrations you stated in your review. You mentioned that there are free online tutorials for Javascript and UnityScript. Would you be kind enough to recommend which ones would be the easiest for me to get started. Thanking you in advance.

    1. Glad you asked! I hesitated on posting any links in the actual review because I wasn't trying to deliberately steer people away from giving Code Hero a try.  And, for the record, I should say that the game's developer Alex Peake is aware of a lot of the frustrations people have experienced with the early version of his game, so hopefully, Code Hero may still develop into a great learning tool!    

      As for your question, Code Academy is a pretty great interactive tool for getting your feet wet with JavaScript. However, if you are unfamiliar with programming in general, you may want to look at this open-license e-book, Eloquent Javascript.  A lot of tutorials about programming languages tend to assume that you are comfortable with programming in general, and so they teach the language, but not really the principles behind computer programming. That can be a real hurdle for beginners, and I think CodeHero inadvertently suffers from this problem a bit, too. Eloquent Javascript is, from what I hear, a bit better at getting around this problem, although I think you'll obviously learn quite a bit from doing the exercises at CodeAcademy as well. I also recently came across Code Avengers, which you might find helpful. Personally, I found the first 10 lessons to be incredibly tedious and couldn't force myself to step through the remaining 30 or so units. But I'm also quite familiar with JavaScript. So it is entirely possible that my unhappiness with it means that it's actually well-designed for a beginner audience.

      As for tutorials on Unity, there are a few of good sites that have a number of video tutorials available. Most of these sites cover the basics of getting started with Unity, but they really shine with the abundance of more specialized tutorials:
      Walker Boys Studio
      Unity Cookie

      If anyone has other suggestions, please mention them in the comments! I'll pull together a more official list of programming resources if there's enough interest.

    2. Hey, yup! CodeAvengers is designed for beginners, people who have never done any programming (although as you can probably imagine it is quite challenging for the total noob). We have received lots of feedback from beginners saying that our course is the best they have tried for beginners as far as level of difficulty is concerned, as well as actually feeling as though they learnt something.

      The course does allow you to skip lessons. If you already know JavaScript, the 1st 40 CodeAvengers lessons are probably not much use for you.

      I have put up a few more challenging lessons that will be part of the level 2 course. Maybe you could check those out.

    3. If I ever manage to get caught up on the million other things on my plate right now, I will definitely give Code Avengers another look. I can always use more JavaScript practice.

      And just to be clear, I hope it didn't sound like I discounting CodeAvengers' usefulness, rather I'm just somewhat wary of my own inability to judge how useful these things are to complete beginners. But I do think the site is a great resource!