CodeCombat programming game goes open source


What exactly is Code Combat?  Well it’s a game that attempts to teach programming by having the player use programming to control the player.  Here I am running through the tutorial portion:




It’s most of what you expect in programming, cleverly disguised as a game.  In this particular case, you double click your hero to edit his “spell”, which is the analog of a function.  On the right you can see I define the players actions in the plan() function, using a list of available “spells”, which as you can see from the bottom, are simply the available methods.


I only played for a very brief period of time but I can see how it could be effective.  It is very subtely introducing programmer concepts like debugging, breakpoints, functions, etc… while truly feeling like a game.  That said, I am an established programmer, so it is hard to look at this through the lens of someone who isn’t new.  I can see some tripping blocks… this for example is never explained, nor is the “.” (dot) character.  It could be at a later point, I am not sure, but at this point the user is just parroting what is expected of them.


Regardless, it is an interesting experiment, the game aspects seem well polished and gamification of programming is a clever concept.  Also, it is completely free I believe.  This does leave me some questions about their business model, but that’s not really my or your issue, now is it?  The best I can guess is CodeCombat is ultimately a recruiting tool… a way to gauge programming ability in prospective hires.  The downside I see here is their demographic is going to skew heavily towards self taught complete beginners, at least initially.  Again though, their business model is their issue.


What you may find interesting is, they have open sourced the project.


Yes, we just open-sourced the last year of our lives–all the code, art, and music for CodeCombat–under the MIT and Creative Commons licenses.

“Wait. You’re a for-profit startup, but you’re giving away all of your code? Are you crazy?”

Nope! Closed source may be the choice made by virtually every startup and every game studio, but we believe this is a convention that needs rethinking. CodeCombat is already a community project, with hundreds of players volunteering to create levels, write documentation, help beginners, playtest, and even translate the game into seventeen languages so far. Now the programmers can join the party, too.

Our mission is to teach you to code. Until we have over nine thousand levels taking you all the way from beginner to Bellard, why not jump into a novice-friendly open source project to keep learning? We aren’t just dumping the code out there and calling it a day–we’ve worked hard to make it simple to contribute. You don’t need to know git, you don’t need to have anything installed, and you don’t even need to know how to code to help with some of the issues on our GitHub.

Or, if you’re into compilers, programming languages, physics simulations, geometry, design, user experience, AI, performance tuning, audio processing, RTS games, RPGs, i18n / L10n, security, 2.5D vector graphics, TDD, databases, voice/video chat, IDEs, or debuggers, then you will love hacking on this project. With cool tech, detailed issues, extensive developer documentation, a friendly dev setup script, and the CodeCombat team ready to help you implement your ideas, this is the perfect open source game to get into. Don’t be shy!


Code/art/music all released under MIT and Creative Commons license.  They went with Creative Commons By license for assets, which means if you use their assets in a derived work you need to credit them as the original creator.  All told, very liberal terms and a boon to developers, even those just looking for assets to play with.  The code is under the MIT license, which so far as source code licenses goes, is about the most liberal.  “Don’t sue us” is about the only caveat of that license.  So, this is truly and honestly an open sourced project.


The code is available on github.  The project is written in CoffeeScript.  If you are unfamiliar with CoffeeScript, its basically a compiler layered over JavaScript ( like Dart or TypeScript ) that attempts to get rid of some of JavaScripts (many!) warts.  It’s a mature language, so you should have no trouble finding resources for picking it up.  If you are already familiar with an existing OO language ( and especially JavaScript ), you will have no problem picking up CoffeeScript.


If you are new to programming and looking for a fun way to learn, or are established as a programmer and are looking for a project to get involved with, this is certainly a new option for you.


Scroll to Top