CodeCombat Blog multiplayer programming en-us Mon, 13 Jul 2020 07:21:11 -0700 Sett RSS Generator CodeCombat now supports Clever

Add CodeCombat to your school district so your teachers and students can use Instant Login.

We’re excited to announce our new partnership with Clever, one of world’s top login and data management services for schools. Now, schools that are already using Clever can add CodeCombat, enabling great features like Instant Login for their teachers and students. Continue reading for more information on how to get started!

Our school district already uses Clever. How do I connect CodeCombat?

1. Log into Clever as an District Administrator -

2. On the left side of your dashboard, click “Add Applications”.

3. Search for “CodeCombat” (no spaces), then click “Select”, and “Next” to continue.

4. On the confirmation page, you’ll need to select whether you’ve already purchased student licenses to use with CodeCombat.

If you’ve already purchased student licenses, select the “Already Purchased” option on the confirmation page. Our team will approve your request and make sure your licenses work properly. If you haven’t already purchased student licenses, select the “Haven’t Purchased” option on the confirmation page. Our team will be in touch about licensing for your school and next steps.

How do my students and teachers log into CodeCombat using Clever?

Once we’ve approved your CodeCombat integration, schools you’ve approved to use CodeCombat will see CodeCombat on their Clever portal — they will be instantly logged into CodeCombat when they click the CodeCombat icon.

New teachers will need to Create a New Class, then share the Class Code or Class URL with their students to make sure they join the correct class. Students will need to get the Class Code from their teacher before they are able to play CodeCombat. Once they have joined their class, they will automatically be assigned Introduction to Computer Science. Teachers can assign additional courses through their dashboard.

Our school district doesn’t use Clever yet. How do I sign up for Clever?

You can find details on how to use Clever in your school district here:

If you’d like to just use CodeCombat in your school district without Clever, you can get started by requesting a demo.

Do you offer a free CodeCombat trial for Clever users?

Yes! Our Introduction to Computer Science course is free to try with your students. You will still need to go through the approval process outlined above to access the trial if you’d like to use Clever.

Some of our schools already use CodeCombat - how do I migrate their data into Clever?

We don’t currently have a way for schools with existing CodeCombat classes to link their Clever accounts.

Please email if you would like to see this feature supported.

What if a student already has a CodeCombat account using their email address?

We don’t currently have a way for students or teachers with existing CodeCombat accounts to link their accounts together. If they already have an account on CodeCombat with the same email address as their Clever account, a new account will be created when they log in via the Clever portal. They can continue to use the two separate accounts as if they were distinct.

Please email if you would like to see this feature supported.

>> Comment on this Post · Like this Post

Wed, 02 Nov 2016 07:55:00 -0700
Just in time for school: Game & Web Development Courses, new features, and more! “CodeCombat is really fun because you get to see that what your character is doing in the game is what you made him do.” -- Mario, 10 We’ve been hard at w]]> Check out our new project-based learning courses to build your first website and game level today.

“CodeCombat is really fun because you get to see that what your character is doing in the game is what you made him do.” -- Mario, 10

We’ve been hard at work all summer building new features, playtesting them in our coding camps, and fine-tuning all the new levels. We’re so excited to finally share all of it with you!

Our biggest announcement today is the launch of our Game and Web Development courses — featuring new, project-based levels that bridge the gap between programming and real world applications by providing players an opportunity to build real websites and games. We’ve already seen amazing examples built by students during our summer camp, and we can’t wait to see more from the rest of the CodeCombat community.

Keep reading for more details about the new courses as well as the other features we’re launching today.

Web Development

In our Web Development courses, students learn the fundamentals of building interactive websites using HTML, CSS, and JavaScript. Our first course, which launches this week, introduces students to basic markup and styling concepts in order to build their first web page, a Wanted Poster for a dastardly villain of their choosing. The second course focuses on scripting and customization, which teaches students how to create their own on-line personality quiz. All webpages are automatically published to a custom URL so that students can easily share their finished project with friends and family.

Check out this example poster by one of the students from our summer coding camp -- the result of just an hour’s work by a student who had no prior experience with web development!

Web Development 1 and 2 are now available for all licensed students.

Game Development

What’s even more fun than playing a game? Making your own! In our Game Development courses, students learn how to build their own CodeCombat-style game levels and unleash them on friends and family to play with a mouse and keyboard. Over time, they’ll unlock the tools needed to create challenging puzzles and practice their game design skills to become the next star game designer. Final projects for each course can be shared are published to a custom URL so that students can easily share their games with friends and family.

Game Development 1 and 2 are now available for all licensed students.

Teachers can preview all Web and Game Development levels by going to the Course Guides page and selecting from the dropdown menus.

Spotlight: Increased Hero Diversity

We know how important it is to have a diverse range of playable heroes to support player engagement and investment in CodeCombat, so we’ve built in a Hero Selector that includes a variety of heroes of all genders and skin colors — students can choose their hero when they create an account and change it at any time.

New tools to help in the classroom

Practice Levels and Hints

We know that different students learn at different paces, and sometimes they may need extra assistance with new concepts. We’ve built two new features to help smooth out the learning curve of students who find themselves stuck.

Hints come in handy when students are struggling with a specific level. Every level has a blue “Hints” button at the top right corner, which give a more in-depth explanation of the level’s specific concepts and provide additional step by step examples of how to complete it.

The second new feature is Practice Levels, which help students get more experience with a particular concept if they are struggling. When the game detects that a student has struggled with a level, the game adapts so the student has more opportunity to practice the same skill until they improve. This provides a personalized learning experience for each student, so they can move past concepts they understand quickly, and get more practice for concepts that are challenging.

Lesson Plans and Syntax Guides

Lastly, we’ve spent time this summer consulting with education specialists to craft classroom curriculum and materials specifically for teachers who are using CodeCombat without any prior computer science experience themselves.

We’re publishing a set of curriculum resources in our new Resource Hub, which includes lesson plans, exercises, activities, and writing prompts to encourage reflection and retention. We’re also making printable guides available for students to reference as they work through levels. In addition, we provide level solutions for every course so teachers can help spot and correct errors in students’ code as they come up. We’ve found these resources reduce friction when introducing programming in the classroom.

If you have a Teacher account, you can log in today to access all of Computer Science 1 classroom materials. Need licenses for students who have finished the first course? Get in touch with our team today so we can build a solution for you!

“CodeCombat really taught me that even though it may look hard, once you learn how to do it, it can be very simple to do.“ -- Alanna, 15

CodeCombat in Your Classroom

If you’d like a demonstration of the new features or help bringing CodeCombat into your classroom, we’re here for you. Just request a demo and we’ll be in touch!

>> Comment on this Post · Like this Post

Mon, 29 Aug 2016 08:00:00 -0700
Announcing CodeCombat Classroom Curriculum, Seed Round from 3KVC, a16z, and Allen & Co I remember when I wrote my first lines of code. I was a freshman in college, and I had signed up for the introductory computer science course on a whim after choosing my practical career-advancing courses: writing, chemistry, poetry, and go. I had never really thought about programming as something you could do, even though my dad was an engineer, and it’s not like my high school offered any programming courses.

At first it seemed boring, abstract. String string = new String(“This is a string.”); – Okay, so what? But by the end of the semester, there was an exercise to code a bit of logic inside a graphical simulation of rabbit and fox populations. I finished the assignment and then added zombies. The infection spread. Chaos reigned. I was hooked. Programming was actually more creative than my creative writing class–I was making something out of pure imagination, and it was cool!

But most of my classmates failed the intro course. It seemed like programming was just too difficult, too geeky. The year after mine, the entire college graduated only three computer science majors (out of 700 grads), and they had been coding from an early age. Was it something you just have to start learning early, like a foreign language? If so, why had I already had like sixteen years’ worth of math classes, four years of Latin, and zero minutes of coding? Virtually no one uses multivariable calculus. Everyone uses computers.

Fast forward to today, and everything is changing. Eighteen countries and dozens of US states and school districts are scrambling to offer computer science classes across K12, with everyone else soon to follow. In a world where computers outnumber humans and virtually none of us speak their language, we want our kids to become native speakers of code. Soon everyone will have the opportunity I wish I’d had when I was eleven.

Yet we haven’t really changed how we teach computer science. Kids don’t think that coding is for them–especially girls and minorities. They try it, and it’s either boring or difficult or both, and they give up. A third of undergraduates taking Introduction to Computer Science courses fail. Sometimes we give students training wheels in the form of visual block-based programming, but when the training wheels come off and they switch to real code, learners often quit in frustration in that moment when they think they can't code at all.

At CodeCombat, we realized that learning programming doesn’t have to be hard or boring. We’ve created a coding game that kids love and that happens to teach kids computer science. 97% of kids play video games, so when you make a great game, it can reach everyone–especially low-performing students, girls, and minorities, who have been underrepresented in computer science. Students playing CodeCombat spend almost all their time coding, so they learn much faster than if they were listening to lectures or reading lessons. It’s more like learning a language–give the player and the computer something to talk about (the game), and the conversation flows as fluency builds.

We’ve spent the last three years figuring out how to make a great programming game. Along the way, we became one of the fastest-growing open source projects ever, were translated by the community into five programming languages and fifty spoken languages, and kindled a love for coding in over five million players. Meanwhile, teachers were constantly asking us how they could use CodeCombat in their classrooms to serve as their computer science curriculum. We set to work creating a clasroom version of CodeCombat, something that teachers with no prior programming experience could use to offer a full year’s computer science course.

Today, it’s here. After an extensive beta period tested with thousands of teachers and more than 25,000 students, we’re launching the CodeCombat classroom curriculum. Designed for students in grades 3-12, our courses cover more real-world programming and computer science concepts than any other curriculum, even teaching 85% of the material from the first two Stanford undergraduate computer science courses for computer science majors (plus many things they don’t cover).

And we’re just getting started. To help us implement our vision of how computer science should be taught, we’ve raised a seed round from Third Kind Venture Capital, Andreessen Horowitz and Allen & Company. I particularly want to thank Shana Fisher, Managing Director at 3KVC and board member at a16z, for her bold advice and expert guidance. This funding allows us to focus on CodeCombat’s classroom offerings, bringing the best computer science education in the world to all schools and districts.

This is the way that kids should learn to code. This is the game that I wished I’d had when I was in school. Programming is a basic skill that everyone should have, but more than that, it’s a beautiful art where you can build anything you can imagine. And as our students grow up learning the language of code, they are going to be native speakers. I can’t wait to see what they create.

>> Comment on this Post · Like this Post

Mon, 02 May 2016 06:10:07 -0700
Happy 2016 - To Another Year of Coding Our team was astounded by the number of students who played CodeCombat during #HourOfCode last month, and we’re thankful that so many educators made CodeCombat part of their curriculum. From the United States to China, the U.K. to Australia, and even as far as Brazil and Taiwan, we saw students logging on and writing their very first lines of code–no drag-and-drop training wheels here!

#HourOfCode by the numbers


Tons of teachers shared their students’ enthusiasm on Twitter - here are some of our favorites below:

Students at Centre High in Edmonton learned how to navigate pesky mazes in Python.

In Hawaii, elementary students helped heroes battle munchkins and ogres.

Students in Spain guide their hero past firetraps while avoiding enemies!

Fifth graders cheered each other on as their heroes rescued allies.

And here is sampling of the teacher feedback we received throughout the week:

"My students liked it so much several said, "Can we do this every day?" and one even asked, "Can we do this at home too?"" - Linda M.

“My class has been struggling with the basics of Python all year. They have started to really not like the class and the work. Today though they were having fun and getting into it. I think they forgot that they were actually learning something.” - Tim M.

What’s next for CodeCombat in 2016?

- Courses 5, 6, and beyond, plus we’re building more teacher resources to support classroom learning.

- A hint system and a multiplayer debugging community to get players unstuck faster.

- New game modes…

- And Java as a language option, at long last!

Follow our Twitter account @CodeCombat for these announcements and more!

Did you know CodeCombat can now provide everything you need to run a semester- or year-long computer science course? Check out how CodeCombat Courses works in schools and start teaching coding in your classroom today!

>> Comment on this Post · Like this Post

Mon, 11 Jan 2016 07:57:30 -0800
The True Ace of Coders The Ace of Coders programming tournament has ended after a month of ferocious coding chaos, with the leaderboards fluctuating by the hour. We’ve exhaustively simulated all 584,086 pairwise matches between all players and come up with the final ranking. Behold, th]]>

The Ace of Coders programming tournament has ended after a month of ferocious coding chaos, with the leaderboards fluctuating by the hour. We’ve exhaustively simulated all 584,086 pairwise matches between all players and come up with the final ranking. Behold, the top ten Ace of Coders champions!

Full rankings are here for all 1345 players. Coming in first is our returning Greed and Zero Sum champion Wizard Dude with only three losses–one to NoJuice4u and two to me.

Second place goes to our other returning Zero Sum champion, NoJuice4u, with 1527 wins and only six losses. Staying in first place almost the entire competition, NoJuice4u was the main target of up-and-coming players, but he still managed to fend them all off with a nearly unstoppable job-queue-based strategy mixing all four unit types.

Because red and blue sides were mirrored for this level, you can see just how close a fight it was in the replays for these two matchups between Wizard Dude and NoJuice4u:

Wizard Dude (blue) vs. NoJuice4u (red) (or on YouTube)

Wizard Dude (red) vs. NoJuice4u (blue) (or on YouTube)

Third place went to MountainRunner, who I just couldn’t manage to beat myself–using many more soldiers than the other top players, he only accrued 11 losses in total. It’s not just all about amassing a huge force of kiting, missile-dodging archers!

I asked Wizard Dude and NoJuice4u about their strategies, and they shared their code and general AI structure, which I’ve linked to and excerpted below. I also spent a lot of time playing this one, trying to win it (but planning to exclude myself from the final rankings). I used all my tricks at the last minute and managed to win 1531 games with 4 losses, but even with all that, I still couldn’t surpass Wizard Dude. I’ll share my code and strategy as well.

If you read these strategies and want to play with ideas to defeat them, go ahead and play–the Ace of Coders ladder will remain open!

Wizard Dude (Michael Heasell)

Wizard Dude summarizes his JavaScript strategy at a high level:

The game is largely about gaining control of the centre point and trying to outplay the opponent’s army to gain a unit advantage. My army strategy focuses mainly on archers, using kiting tactics to keep them alive for as long as possible while dealing damage to priority targets.

To gain control of the centre, I simply move my goliath directly to the point and stand on top of it. Of course, the enemy goliath will usually try to do the same thing, which results in a wrestling match between the two goliaths. I use my goliath’s abilities to try and keep them away while I accumulate a gold advantage.

The farA and farB points are usually only defended by one unit and it can be difficult for an opponent to recapture them once the battle for centre has started. I build an artillery at the start of the game and, if it survives the initial conflict, I use it to pressure these points.

Once the battle for centre has been decided, I clean up the remaining units on the map, then send units to attack the enemy goliath until he goes down.

He lists a few clever tricks he uses:

I immediately build three archers and send them towards centre to secure it as quickly as possible. I use buildXY to summon them in front of me to save a bit more walking distance. I then summon two more archers, one for each of the nearA and nearB points. Again, I use buildXY to summon them closer to their respective points. Finally, I summon an artillery.

In my opening, I use buildXY to build the artillery behind and a bit off to the side of my goliath. I found that, from this unexpected position, it is sometimes possible to survive the first shot from an enemy artillery while also taking theirs out.

Another important topic is when to build units. The goliath is usually right next to enemy forces, which is not where you want archers to be, so summoning at the wrong time can lead to their immediate death. To cope with this, my strategy prevents spawning units if any of the following conditions are met:

  • We are on the opponent’s side of the map and the enemy goliath is behind us.
  • We are in splash range of an incoming artillery shell or boulder.

His artillery strategy was particularly effective:

Artillery has the longest range in the game, so as long as you stay far back, the only real threat is another artillery piece. My logic goes like this, in priority order:

  • If an enemy artillery is in range, fire at it.
  • If the artillery isn’t in range, but is within range + 10, fire at max range in their direction to try and hit them with splash damage.
  • If we are less than 4 seconds in and the enemy doesn’t have enough gold to buy an artillery, attack the ground in front of their goliath.
  • If an enemy tower is in range, attack it.
  • If an enemy unit comes too close, move away from them.
  • If we are near where an enemy shell will land, move away from that location.
  • If there’s an enemy artillery on the field, but it’s not in range, use a forces algorithm to steer towards it while trying to avoid any other enemy units on the field.
  • If farA or farB belong to the enemy team, attack their position, choosing whichever one is nearest if they have both been captured.
  • Attack the nearest enemy tower.
  • Attack the enemy goliath.

He summarizes his tournament experience:

Winning was pretty tough, and I should credit NoJuice4u for playing the game of ping-pong with me as we both repeatedly adjusted our strategies to one-up each other in fights. Nick Winter was also a fierce competitor, though I’m sure that at least some of his advantage was due to having built a large portion of the game. :)

Let’s check out some of his threat avoidance strategy:

Wizard Dude has posted a full, detailed strategy writeup here and shared his full solution on GitHub.

NoJuice4u (Wayne Chen)

NoJuice4u describes his approach, also using JavaScript:

This time around, I had to structure my code more carefully otherwise it would become very difficult to analyze and debug. To accomplish this, I created a "Job Queue" object to effectively assign jobs to various units. That way, an archer assigned to "Capture" will focus on capturing, and not assault. This also means that while my opponent can identify the type of unit I have, it is largely unknown what purpose that unit actually serves.

Alongside the job queue structure, he came up with an advanced danger zone detection algorithm:

My findDangerZones function is essentially the backbone of my strategy. While many of the tournament players have a strategy to move their units out of AoE effects, the difference with mine is that I also calculate whether my unit will walk into an AoE effect, and move along the perimeter to get closer to the target, while staying out of danger. That's why they rarely "bounce in and out". However, there's a few edge-case issues that cause the bounces to occur when multiple AoE's overlap. Each "Danger Zone" has a type category and a defined radius, so that I can keep a short distance from soldiers, medium distance from the boulder, and great distance from the artillery shell.

I take these into consideration as "AoE Effects":

  • All artillery shells (obviously).
  • Goliath throw boulders.
  • Enemy Goliath.
  • Arrow Towers that are targeting the unit.
  • The farthest point from the enemy goliath that is within 8 units of my goliath, if I am close enough, and hurl is not on cooldown. (Where I will likely hurl him)
  • Enemy Soldiers.

Wizard Dude commented on NoJuice4u’s job queue and danger zone approach:

I liked NoJuice's job queue approach to assigning units -- I actually also invented something similar, but later threw it away because it was too complicated. My idea was to have a "bucket" for each point, and calculate the "size" of each bucket based on distance and enemy presence in the area. Then I would sort the buckets from smallest to largest and assign units until the first was full, then repeat on the next bucket until out of units. This would allow me to pressure side points if centre became too hard to take, or deal with base swap scenarios. NoJuice's take on it seems to be superior though, as his definition of a job is more flexible and he considers the roles each unit can perform (and, of course, because his idea actually made it to his final version).

His danger zone logic to prevent units dithering in and out of dangerous areas is also pretty interesting. I tried for some time to come up with a forces based approach (since it worked so well for gold collection in greed and zero sum) to solve this problem for archers, which would allow them to path towards an attack target or objective via the least dangerous route. However, I found it too difficult to properly tune, so I gave up on it. In practice I didn't notice too many issues with my archers dithering, but I did have this problem with artillery. This is why my artillery *does* use forces to navigate when trying to approach an enemy artillery. It's pretty poorly tuned but it worked for the scenario I was having trouble with.

NoJuice4u had most advanced danger zone avoidance pathfinding routine I saw:

NoJuice4u has posted a full, detailed strategy writeup here and shared his full solution on GitHub.

Me (Nick)

I joined in the tournament to have some fun and see how well I could do with my insider knowledge and dirty tricks (many of which went on to be adopted by the other players). I managed to do things more concisely using Python, which we transpile to run in the browser the same as JavaScript with our transpiler.

I only build archers, trying to build up an archer superiority. If the enemy builds an artillery or tower that my archers or hero aren't close enough to quickly kill, I'll build a reactive artillery to help destroy it.

I used a simpler method of having my archers flee from soldiers, the enemy hero, towers, and incoming artillery shells and enemy boulders. They just run straight away from the center of the danger until they're far enough away, and if they run into a wall, they stand their ground and die! I don't handle overlapping danger zones very well, instead trying to prevent the enemy from making multiple types of danger zones at once. MountainRunner was able to defeat me by making more soldiers than I was expecting to deal with, and hiding archers behind them so that I couldn't kite them.

My big advantage on the dodging of enemy artillery shells came from the way I determined whether a shell needed dodging. Where Wizard Dude dodged any shell that was within 20m of its intended target, and NoJuice4u dodged any shell regardless of when it was fired, I only dodged shells that had a negative z-velocity--they were already halfway through their flight trajectory. Since shells take about four seconds to land, this let my archers keep firing much longer before fleeing, even if the aggressive artillery was shooting from nearby. Another key optimization I added at the last minute was to not build anything if a shell or boulder was about to land on me until it had safely exploded on my sturdy goliath.

I also really aggressively went for the center point, even going so far as to have my own goliath hurl himself toward the center at the beginning of the match to get there faster, never mind the self-inflicted damage. My goliath would often avoid even attacking so that he wouldn't pause for a split second in issuing his commands to his archers, so that the archers could dodge and target more responsively. He mostly tried to stand exactly on the center point so that the other goliath couldn't take it from him, thus building up a resource advantage at the cost of his own health until the late game.

To try to build up my archer horde, I built the archers away from the enemy hero, unless he was closer to the center, in which case I rotated my build offset by 90˚ in hopes that I could hurl the enemy goliath to the other side soon.

I dedicated only one unit to controlling each point unless I didn't yet own it, in which case I would send a larger squad. If I managed to build up an advantage, I was often able to take all the points except the far corner while the enemy did heavy damage to my hero, but then all the gold was mine and I'd get a giant ring of archers to end the match in a matter of seconds.

I’ve posted my full solution here:

If you enjoyed this, subscribe to the blog or the newsletters that come with your CodeCombat account to learn when the next tournament is available, and play some Ace of Coders to get ready.

>> Comment on this Post · Like this Post

Tue, 27 Oct 2015 08:16:00 -0700
Ace of Coders Multiplayer Programming Tournament Our newest multiplayer arena level is here, and with it comes the next coding tournament! In Ace of Coders, you write code to summon armies, command minions, vie for control points, and use your hero to overwhelm your opponent’s forces. Choose new foes, improve you]]>

Our newest multiplayer arena level is here, and with it comes the next coding tournament! In Ace of Coders, you write code to summon armies, command minions, vie for control points, and use your hero to overwhelm your opponent’s forces. Choose new foes, improve your strategy, and watch your code fight its way up the leaderboards. You don’t need any CodeCombat experience to play–just a mind for programming, a thirst for gold, and a hunger for battle.

The tournament begins today and lasts for a month. On Wednesday, October 14 at 5PM PDT, we’ll snapshot the leaderboards and simulate some additional ranking to determine the winners. The top ten players will skip straight to final CodeCombat job interviews. We’re hiring for our San Francisco office, and if you want to build the programming game that will be the default way everyone learns to code, then we think you’ll enjoy this tournament. (If you can’t join us, then just play for fun.)

What’s New

We had a blast running our past three tournaments: Greed, Criss-Cross, and Zero Sum. We’ve come up with a few new things for this one:

New Level

The Ace of Coders arena contains seven control points, each of which grants 3 gold per second to the team controlling it. You use this gold to summon soldiers, archers, artillery, and arrow towers. You’ll need strategy around which control points to contest and what armies to build, and you’ll need tactics to win each skirmish and build up your advantage. Thanks go to player David Liu for putting this level together.

New Hero

Commanding your forces is the mighty Goliath, Okar Stompfoot, a new hero released with this arena. He’s nearly indestructable and can smash anything near him with his mighty club, but he’s slower than a turtle riding on a depressed slug. Play the level to try out his new stomp, hurl-enemy, and throw-boulder abilities.

Private Leaderboards

Want to hold a casual competition amongst your friends, classmates, or colleagues without Wizard Dude crashing the party? Simply invite them to a CodeCombat clan, and you’ll have your own Ace of Coders arena instance and league leaderboards. You can follow our tournament timeline or come up with your own schedule.

Red vs. Blue Mirroring

For this mirror match, we’ve symmetrized it so that you just have one strategy that applies to both the red and blue ladders instead of two different pieces of code. It also auto-submits whenever you run the code without errors. This will let you easily see how your code does against all players without having to paste it into both sides. (If you prefer, you can just play on one side by never starting a match as the other side.)

Play Now

Check out the Ace of Coders arena and see the future of programming tournaments!

>> Comment on this Post · Like this Post

Wed, 16 Sep 2015 08:30:00 -0700
Kings of Zero Sum: Strategies from the AI Wars It began in Singapore, where the top young coders sent thousands of soldiers to destroy one another. It then spread worldwide, turning innocent game developers into sorcerous warlords. The sky darkened with arrows, spears, artillery shells, and clouds made of solid gol]]>

It began in Singapore, where the top young coders sent thousands of soldiers to destroy one another. It then spread worldwide, turning innocent game developers into sorcerous warlords. The sky darkened with arrows, spears, artillery shells, and clouds made of solid gold. Freed from eternal imprisonment by countless reckless targeting algorithms, the mountain yetis charged into the fray, causing a worldwide bone shortage. The Zero Sum programming tournament was upon us.

The Winners

The #1 ogre king is the returning champion Wizard Dude (Michael Heasell) with 162 wins and 1 loss across all human opponents. In second is xxx9877654321, with nemoyatpeace in third.

The #1 human king is the unstoppable NoJuice4u (Wayne Chen) with 105 wins and 3 losses, trailed by Qenf in second, with Stofflon and Driphter tied for third.

We’ve posted the full rankings here for all 193 players.

When two kings of code go head to head, mountains shake and widowers wail. Watch the climactic battle between human NoJuice4u and ogre Wizard Dude to see who won the ultimate matchup.

Wizard Dude

Wizard Dude won our first tournament, Greed, and so the mere sight of him on the battlefield terrified his hapless Zero Sum opponents, not least because he had won a custom CodeCombat hero in the last event. He has posted his full code on GitHub and written a detailed blog post about the strategy behind his 1034-line solution.

Strategy Summary

Wizard Dude optimized for winning the first fight, which usually decided the game as well. He relied on his superior coin collecting (using the forces-based approach he invented in Greed) to play defensively and build up a numbers advantage, only fighting when necessary.

To maintain a strong army, he delayed summoning units until the last moment and only griffin-riders and soldiers for a simple balance of damage and tanking, including targeting ranged attackers and kiting soldiers. He used a prioritized list of actions to control his hero, including tactics like:

  • Cast fear on a yeti targeting his hero, or on the enemy sorcerer
  • Flee the yeti and collect coins if it's nearby
  • Cast raise dead if there are two corpses in range that aren't artillery
  • Sort enemy troops into bins across the level, find the bin with the most enemies, find the centroid of those enemies, and run there to mana blast them
  • Use the hero to attack any artillery the enemy has summoned
  • Cast goldstorm if the enemy hero is too far away to steal the loot
  • Jump long distances whenever jump is ready
  • Reset cooldown on mana blast, raise dead, and fear if those actions are needed but not ready
  • (e.g. do not bump into the Yeti, if nothing to do then collect coins).

Read Wizard Dude's full post for more details on his strategy. He describes his experience participating in the tournament:

CodeCombat imposes an upper limit on the amount of code you can execute in a given game. This limit is normally never hit, since I think this is intended to prevent problems with newer programmers accidentally writing very inefficient code. For Zero Sum however it was easy to hit this limit amidst all the chaos. For a while, the battle was more about fitting smart logic in under the limit than actually coming up with it! To help me with optimizations I started using sweet.js macros to automatically generate some of the more boring boilerplate code. I used a gulp task to have it auto-rebuild my output every time I hit save in my editor so I could copy and paste it straight into CodeCombat. I also ended up splitting things into multiple files as my code got longer.

Quite near the end of the tournament, in response to feedback on the forum, the hard execution limit was tripled. This suddenly made a lot of ideas more practical to implement, so a lot of my final AI sprang up over the last weekend as I raced to make use of all the extra statements.

Up until about Saturday afternoon I didn’t really think I had a hope of winning. The previous version of my AI used a system of utility values to decide which action to take, but tuning how the utility scaled for each action was basically guess work and made it impossible to understand the resulting behaviour. I was only at about 20-30th with this code and I had no idea how to fix it. On Saturday I threw it all out and started back with the simpler fixed ordering and suddenly things were a lot more promising. Coincidentally, this was also the first day that my custom surfer dude sprite, one of the prizes from my Greed tournament victory, showed up in my Zero Sum games. I did it for you, little buddy.

My strategy largely tries to ignore the yeti. However, I did have a problem with my hero trying to go through the yeti cage to get to things on the other side. I ended up writing some special case logic to steer me around the cage if I am trying to get to the other side.

Zero Sum was, as always, a fun tournament to be in. I think CodeCombat really outdid themselves with the level of chaos in this latest arena and have provided a good framework for implementing clever strategies. I’m sure the next tournament will be even better! Be sure to watch out for the wizard with the surfboard and drink, I hear he’s quite a feisty opponent.


NoJuice4u is a strategic mastermind. He took the top human spot with just 291 lines of code in his deadly, dense solution.

Summary Strategy

NoJuice4u used a vector-based coin collection algorithm that would tell his hero to move in a direction rather than to a specific coin’s location. He broke his battle strategy into three phases:

  1. Get ready for combat: engage in controlled formation
  2. Skirmish: use advanced tactics to overwhelm the opponent's forces and gain a gold advantage
  3. When the yeti appears, abandon all decorum to kill the enemy sorcerer, while using fear to avoid it, and using friendly troops to lure the yeti closer to the enemy hero.

NoJuice4u’s hero ability use was more situational rather than a simple prioritized list executing against cooldowns. For example, his first mana Blast was used to run in and scatter opponents during the first engagement, while following blasts were based on enemy clusters and current move destination. He prioritized casting fear on the enemy hero over all else. He also used griffin-riders and soldiers, but found that keeping an archer back in the ranks away from his griffin-riders often helped him dish out additional damage.

For a detailed explanation of NoJuice4u's strategy, check out his detailed writeup.

Though the Zero Sum tournament is over, the arena will stay open, so have fun grabbing gold and working on your micro AI. (Anyone want to take advantage of artillery's insane power and add missile dodging to avoid friendly fire? I do!) See you on the ladder.

>> Comment on this Post · Like this Post

Thu, 09 Apr 2015 12:45:48 -0700
Zero Sum Programming Tournament Today begins a ten-day coding tournament for our newest multiplayer arena level, Zero Sum. It’s a mirror match between red and blue, with both heroes as Sorcerers sporting the same powerful weapons and armor. Collect gold, summon armies, command minions, cast spe]]>

Today begins a ten-day coding tournament for our newest multiplayer arena level, Zero Sum. It’s a mirror match between red and blue, with both heroes as Sorcerers sporting the same powerful weapons and armor. Collect gold, summon armies, command minions, cast spells, and fight dirty!

On Monday, April 6th at 5PM PDT, we’ll snapshot the leaderboards and do some additional ranking to crown the two champion angels of eternal glory, but you can keep playing after it ends. If you enjoyed our past two tournaments, you'll love this one. You don’t need to have played CodeCombat before to play, although complete newbie programmers may want to play the campaign first.

New stuff: controllable artillery and griffin riders plus access to Pender Spellbane and the goldstorm, raise-dead, fear, and drain-life spells. Plus mana-blast and reset-cooldown. And a yeti in a cage. I even put some birds in there.

Pick humans or ogres (they’re the same, only the ogres are, uh, blue humans), defeat the simple AI to get started, and then claw your way up the leaderboards. Your code fights for you constantly against all comers, and you can start playing any match you lost to improve your strategy.

May the cleverest code win! Play Zero Sum now.

>> Comment on this Post · Like this Post

Fri, 27 Mar 2015 09:00:00 -0700
Meet CodeCombat's New Chief Artisan Thanks to all 38 hopefuls who wrought fine aud]]> The dawn breaks. The fog lifts. The fields are finely mulched with the corpses of human, ogre, and Artisan alike. The search is over. Standing victorious atop the champion's spire is our new Chief Artisan, Catherine Weresow!

Thanks to all 38 hopefuls who wrought fine audition levels with the level editor. The competition was intense, and there were a ton of great levels in the mix. Curious? You can play all the audition levels here. We'll also be including a few of the top levels in the main campaign soon.

I'd recommend starting in the upper left, where we put some of our very favorites, including Catherine's own entry, "Hold the Forest Pass". You'd want about 300 health, basic flags, and a long sword for all of these levels.

>> Comment on this Post · Like this Post

Tue, 27 Jan 2015 08:32:00 -0800
CodeCombat is Hiring: Chief Artisan Want to work full-time building new CodeCombat levels that millions will play? You should join CodeCombat as our Chief Artisan. Your Missions: Build levels! You’ll use our level editor to turn concepts into levels. It’s equal parts dragging and dropping ogr]]>

Want to work full-time building new CodeCombat levels that millions will play? You should join CodeCombat as our Chief Artisan.

Your Missions:

  • Build levels! You’ll use our level editor to turn concepts into levels. It’s equal parts dragging and dropping ogres, writing custom level scripting, balancing gameplay, and writing documentation and level metadata.
  • Tune levels. We have extensive analytics on where players get confused or stop having fun. You’ll dig into that data to come up with balance tweaks, helpful asides, and improved pacing for all our levels.
  • Create level components. Code up new hero abilities, spells, items, and enemies that will be used across multiple levels.


  • Flexibility. This is a remote job. Work wherever, whenever you want, as long as you get levels done.
  • Challenge. Building levels that are both fun and educational is nearly impossible–just the way you like it.
  • XP. This is an entry-level game design and programming job, but you’re going to level up fast.
  • Gold. Nothing is more important to CodeCombat than the levels, so when you’re making great levels, you’ll be well rewarded with competitive pay.


  • A good coder. You actually don’t need to know much programming, but if the CodeCombat levels we have so far are hard for you, then making them is going to be even harder.
  • An enthusiastic player. You need to have played all the levels up through Coinucopia at the minimum, and ideally you are waiting hungrily for each week’s level releases. If you enjoy CodeCombat, you'll have the empathy required to make levels that are fun for others as well as yourself.
  • Creative. We’ll work together to design levels, and you’ll bring them to life in the level editor with your artful Artisan artistry.
  • Detail-obsessed. You’re going to need to care deeply about your levels, even down to the starting indentation on the newlines in the sample code after each if-statement. You're so attentive, you even read this entire post and luckily noticed the next sentence. Please include the word “rampage” in the body when you email about this job.
  • Fluent in English. You don’t need to be a native speaker, but your communication needs to be good enough to work smoothly as a distributed team member.
  • Fast Internet and computer. Our development tools are resource intensive.

The job starts as soon as possible, so we can’t wait until the summer, nor will part-time be enough.

We don’t care about traditional credentials, so we’re going to do this by audition: after you get in touch with us to tell us about yourself, use our level editor to build this level. When introducing yourself, be friendly, not formal. Ask questions.

Please pass this on to friends who might be interested. We’ll review applicants on a rolling basis and update this post when we’ve hired someone.

Our mission is to make programming feel like the magic that it is. So put on your robe and wizard hat and join us!

Update: we have our new Chief Artisan. Stay tuned to find out who and play all 42 audition levels.

>> Comment on this Post · Like this Post

Thu, 08 Jan 2015 17:25:59 -0800