CodeCombat is a programming game for learning to code; a multiplayer coding challenge arena for sharpening your skills; a Y-Combinator-funded startup; and as of this weekend, the largest open source CoffeeScript project and a fantastic way to get into open source and game development. Whether you’re a novice programmer wanting to figure out this GitHub thing or an open source guru looking for something to sink your teeth into, check out our GitHub and join over two hundred CodeCombat Archmages in building the best programming game ever.
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.
When we open-sourced everything a month ago, we were nervous. What if no one contributes?, we worried. We had spent a week writing documentation, automating the developer setup, filing easy issues, paring down the repository, and preparing licenses. We wanted to demonstrate that open source should be the default choice for many startups and games, but if we failed, then we would have done the opposite.
We needn't have worried. The CodeCombat Archmages swarmed the GitHub gates, breached the dev setup bug barricade, and presented a plethora of pull requests. Here are the first month stats:
"Okay, sure, that's a lot of contributors, but are they really helping? Those pull requests are probably tiny changes like centering some div. I bet the CodeCombat team is still doing almost all the real work and the open source thing is just for show."
Not convinced by a list of numbers? Good; I wouldn't be, either. Let's dig in and see how much the Archmages have really contributed. Here are the top five open source contributors with links to their commits:
What happens when you challenge hundreds of elite programmers to put on their robes and wizard hats, enchant their minions to solve a constantly shifting multi-agent traveling salesman problem, use the loot to build mighty armies, and vie for eternal glory and tournament prizes?
You get a lot of clever coding, dirty tricks, attempted exploits, brilliant strategies, and an epic programming war that left millions of human and ogre widowers weeping for their fallen wives. And you get two unspeakably powerful Archmage champions.
Here are the results from our Greed multiplayer programming tournament. By the way, many of our talented players are open to job opportunities, so if you're hiring (or know someone who is), check out our employers page.
Last week I set out to see how many hours of programming work I could do in one week on CodeCombat, our multiplayer programming game for learning how to code. I clocked in at 120.75 hours. Here's the epic time-lapse video I generated from Telepath (watch in 1440p if you can):
So what did I learn from this experiment?
Adjustable height desks are amazing.
I bought one from Ergo Depot a few days before. I must have switched between sitting and standing fifty times last week. I would never have survived otherwise.
Originally posted on the CodeCombat blog.
What a crazy weekend! We launched our beta on Friday morning by posting to a few subreddits hoping to pick up a few more interested users who could play through our levels as we started to release new ones with the level editor we just finished. But we were not prepared for how many people would come check it out. We stayed #1 on all three subreddits for over a day, amassing 1466 points, 384 comments, and far too many players for our real-time multiplayer server to handle (forcing us to shut off the multiplayer and all server code synchronization). And that’s all before we were crushed the next day by what appeared to our beleaguered Scott as all of Brazil, or at least every Brazilian on Facebook. (Olá!)
With all the chaos trying to keep the server up and the bugs down, we slept little and prepared for the next day’s Startup School even less. We had been tapped for on-stage Y Combinator office hours with Paul Graham and Sam Altman. We watched a video of previous on-stage YC office hours and concluded that “office hours” really meant “eight minutes of two of the smartest startup guys in the world demolishing your idea in front of 1700 entrepreneurs and a live video stream”.
Fortunately for us, they liked our startup and were much nicer than we expected. In fact, as we were walking off stage thinking, “Hey, that went well—maybe we’ll get an interview!”—then Paul whispered something to Sam, who nodded, and they called us back.
In one week last week, Code.org’s Hour of Code reached more than 15 million students in 170 countries. 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 Code.org’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.
As one of Code.org’s partners, we at CodeCombat were both excited and hilariously unprepared to help teach such a sizable swarm of students to defeat the 44 ogres in our beginner campaign. Read on for what we learned from the onslaught of child programmers, including how obsessed kids are with games, how American students are the best trolls and the worst programmers, just how badly a user experience test can go, and the unfortunate difference between reddit traffic and school traffic.
Teachers Want Lessons, but Kids Just Want Games
Code.org lists 24 one-hour coding tutorials from partners across seven categories. These are ranked by teachers, and the higher the rank, the higher the clicks, roughly following a Zipf distribution. Probably because CodeCombat joined Hour of Code at the last minute, we’re relatively new, and the site still had some bugs to iron out when we were evaluated, we were placed in the 18th-most-desirable slot. That’s so far into the long tail, we expected to get around 0.1% of the total students going to the third-party tutorials.
Ho, Wizard! Do you enjoy commanding minions from atop piles of gold? Do you want to win up to $2000 in prizes, get a new job at a tech company, or have your defeated foes bow before you? Then play Greed, CodeCombat’s new multiplayer programming arena level.
Today begins a three-week programming tournament with $40,000 in total prize value. You play as humans or ogres, write code to command your peasants or peons to gather gold and build armies, and watch your code battle its way up the leaderboards.
Up for a fun challenge? Want a sweet job? If you can beat Gridmancer, our first developer challenge level, we'll help you find a programming job in the San Francisco Bay Area. This is a hard level, so if you can do it, you're probably qualified for some amazing opportunities.
In Gridmancer, you write an algorithm to cover the empty floor spaces in as few rectangles as possible. This is a real problem we had to solve in CodeCombat for both our pathfinding system and for our collision handling optimization system. Our implementation does it with 33 rectangles, but it's possible to do it with fewer--many of our playtesters actually beat our implementation, and a couple found the optimal solution of 29. (We're going to steal one of their algorithms to make CodeCombat itself faster.)
This level is a test of the CodeCombat coding challenge system. If you can beat Gridmancer in 40 rectangles or less, let us know--we'll personally talk to Silicon Valley tech companies on your behalf to try to get you hired. We're already working to place several early Gridmancer players.
TL;DR: Once upon a time, there was a Problem. And lo! I did create an Algorithm to solve it. ‘Twas an imperfect hero, greedy and brutal at heart, yet virtuous in its straightforward character. I spent, like, two hours on it, and I was well-pleased. Then came a hundred hundred Programmers from the Internet to annihilate the Problem and make my poor Algorithm look dumb.
The Legend of Monetization
In CodeCombat’s original pitch that got us into Y Combinator on stage, we said we could make money from employers by finding jobs for our most talented players. That way, we can keep the game free to play for everyone. Last month, the YC partners challenged us to test our assumption and find out whether we could actually get hirable players interested. We set out to make a hard developer challenge level as a proof of concept, and eventually came up with last month’s Gridmancer challenge.
The Wicked Problem
We wanted something we could put together quickly with the CodeCombat level editor that would be hard enough to test players’ programming fu, not just their Stack Overflow fu. I thought back to a problem I had struggled with while working on the CodeCombat world simulation performance. We’d have these dungeon levels with hundreds of Dungeon Wall Thangs, and even though each wall would hardly interact with any of the other Components, there were still places in the code with O(walls * frames * properties per wall) or O(walls * frames * thangs) interactions. Box2Dweb’s collision handling, though smart, also started to slow down with so many walls.
1st Place - MacBook Air: basicer (Rob Blanckaert) for his Lua parser, Lua 2 JS