Guide for playing Multiplayer ladders / simulating / clans - or - How to Gem farm - read if you need multiplayer help

~ Guide to Multiplayer ladders ~

If multiplayer has you confused like it did me, read on, this guide is for you! Learn how to farm to get hundreds of gems, rank yourself up on the ladder, create your own clan tournament, and return to the campaign map easily. ![|600x200](upload://pSEW0VjZGiMVQ5PsMCsUbGAJOjz.png)

Multiplayer Link: http://direct.codecombat.com/play/ladder

Index:

  1. What is Multiplayer?
  2. How to play multiplayer
  3. How the “simulate games” feature works
  4. Understanding the Ladder tab’s Ranking
  5. How to improve your code
  6. Returning to the Campaign after you complete a multiplayer level
  7. Gem Farming!
  8. Spectating
  9. The More Button
  10. The Winners Tab
  11. Clan Leagues
  12. Answers to Popular Questions

 


What is Multiplayer?

Is there a users guide? - #3 by BunchofCrooks (Dec 2014)

You can think of it as a game of online chess. Each move on the “chessboard” is a submission of updated code. You submit your code and then simulate battles to rank up as your code is played. If you defeat another player they can then update their submission and run more simulations to compete against your code. You do not compete live against each other, however you can watch the simulated match.
▲ Top


How to play multiplayer

1. Compete against the Computer AI

Most of us have finished the multiplayer levels while playing the campaign and won against the simple AI. But this is just the first step. There may be as many as 4 more levels: easy, medium, hard, and very hard to beat. You can play as red and as blue and each challenge level may be a little different. (5 total levels) ![](upload://ckKzgQ9Xm4vnsC7XD0eP4VFIsM5.png)

Remember that your code will be different for each team, so if you make improvements to one side, you will need to manually update the other as well.

2. Simulate Games to Rank up

Click on the simulate tab on the multiplayer screen and click the simulate button.

This takes any code you have submitted and runs it against another players code to see which AI wins. You will also run other matches with two different players to help resolve ranking throughout the community. It might be up to 100 to 1 to get your matches played. So keep simulating.

3. Directly challenge another players/students AI

On the **Ladder** tab of multiplayer you can click the "Fight" link next to another players name and directly challenge them. This fight may or may not show up in your "matches" screen but allows you to challenge your friends and players ranked in the top 10 to see if your solution is ready for farming. Remember to submit code for each team, red and blue, by clicking on the "Play as Red" and "Play as Blue" buttons so that you can challenge people on the other team.

If you copy the fight link from next to your name you can share it with your friends and you can compete against each other.

I have heard that you can also link to CodeCombat in Facebook and Google+ to compete with your friends. If anyone knows how to do this, please feel free to reply to this post with detailed instructions on how to do it.

4. Join a "clan" and compete against other clan members

[Clans](https://codecombat.com/clans) allow you to choose who gets ranked in a league in Multiplayer. Joining a clan is like joining a league. Once you have joined you can simulate games and you can be ranked against other players in the "clan" league.

▲ Top


 

How the "simulate games" feature works

At first I did not understand how this feature worked. So I have done my best to explain the process below so that if you are having any issues you can either report that multiplayer is not working or resolve the issue on your end.

When you click on the simulate button a process should kick off that goes through at least 4 steps:

  1. Setting up Simulation…
  2. Simulating…
  3. Simulation completed, sending results back to server!
  4. Results were successfully sent back to server!

You should see the text that is above the “Simulate” button change as it runs through each simulation. The “Games simulated by you:” number will also increase after each successful simulation.

Under the hood the browser console should look something like this (click to expand)

Code is downloaded from the server to your browser, your browser acts as a remote processing unit for the simulation, and when the simulation is completed it has to then submit the results back to the server. So there are many points here that might go wrong.

What to look for

Three other things will then start to happen. Under the "My Matches" tab, matches will appear. ![](upload://xdWh8oAbUM9EpIuRAlGjRma4eK5.png)

Under the “Ladder” tab you should start to see your rank rise or fall.

Your gems should also start to rise after some time.
Before simulating:

After simulating:

If this is your first time simulating and you do not see these things happen after 1000 simulations, then something is most likely wrong. And you can ask about it on the forums. If you don’t notice the number under the simulations button increase, try refreshing the browser button and remember to re-click the simulation button if it is unpressed. It is common for the simulations to stop after 400 iterations or so. On the up side this process can sometimes run all night without any need to watch it.

I am not sure if it is for every 10 games you get one of your matches run, or if its more around 100 to 1. But it will take many simulation runs to have matches played against your code. This is to help the community. Anyone else running simulations will have a chance at running your code, so this will help you too.
▲ Top


 

Understanding the Ladder tab's Ranking

It appears that rank on a ladder is based on the points your have earned and not who you have beaten in a match. So challenging one of the Top 10 and winning by itself will not get you placed in the top 10. The more games you win the more points you will earn and it will take a while for you to rank up. Challenging players in the Top 10 should be used to help you come up with a strategy in how to win games overall.

Resubmitting Your Code

When you resubmit your code the game will automatically dock your points. It shouldn't remove more than half, and the last time I tried it only removed around 200 points form 10,200 overall. The good part about this is that it appears that you will get many simulated games right after you submit your code so if you have improved the code your overall score should rapidly rise again gaining back the lost points. ![|480x331](upload://z7k32suzkreydvKRKl1zJK9Rsrm.png)

Loosing a Match

When you loose a match your score will drop. So you could go from rank #20 to rank #25 from a single lost match. Winning more matches will bring your overall score back up, but the goal is to try to win without loosing any matches. This may take time as you level up, gain better equipment, and create better strategies. ![|493x334](upload://8DXQp4CqVJcpoy89yBSmHaySN5f.png) ▲ Top

 

How to improve your code

Watch your losses

As you are simulating games you may notice losses. If you have lost a round, view the battle by clicking on the "Defeat the Blue" or "Defeat the Red" link on the row of the lost game.

Look for the reason you lost and think about how to overcome that challenge. Did your player run into a wall and get stuck? Are you fighting against a spell caster or other special class? Are you being mobbed by the ogres? It can be a wise idea to stop simulating after each loss to improve your code and then resubmit your changes to both the red team and blue team.

Challenge the top 10

You can run a game by clicking on the Fight link of one of the top 10 players, but you don't have to submit the match unless you win. Remember you have to have code submitted for the opposing team in order to fight. See how well you do against some of CodeCombat's top players. This will help you know if you need to work on getting better gear or if you need to create functions to deal with the many scenarios that may arise. If you can defeat anyone in the top 10, its a good time to setup a gem farm and rank up! ▲ Top

 

Returning to the Campaign after you complete a multiplayer level

If you were playing a campaign like the **Kithgard Dungeon** and then clicked on the "Cavern Survival" level and submitted your code you will notice that you can only "Return to Ladder" and there is no "Continue" button.

If you click on the “Return to Ladder” button it will take you to the multiplayer screen for that level and not back to the campaign like the Kithgard Dungeon.


There is an easy SOLUTION. Instead of clicking on the “Return to Ladder” button just click the web browsers back button and you will end up back on the campaign screen.

?This may be designed this way due to the way multiplayer is setup? Since you can play games by using the multiplayer web pages “return to ladder” gets you back to the multiplayer screen so that you can continue.

If you have pressed the multiplayer button by mistake you can always return to the campaign you were playing by clicking on the “home” icon and then clicking “Continue Playing”.


▲ Top



 

Gem Farming!

Does earning gems in your sleep sound like fun? Read on as it is easier than you think to earn gems!

By now you should have read the section on simulating games and understand how to run them. What we will be doing is opening up more browser windows and copying the URL for the simulation webpage into each one. Then click on the simulate tab for each and click the simulate button. What should then happen is a frenzy of simulations and your computer CPU will most likely start to climb in utilization.

9up Gem Farm:

The way I know my farm is working is by listening to the fans on my laptop. If they are going like mad, then I know I am earning gems! Above is an 9up gem farm and it works really well. You can monitor all 9 browser windows while you watch TV or even just set this up before you go to sleep at night. I have had it run in some capacity all night.

Refresh windows that stop running

If any of the simulations stall out and stop working just click the browsers **refresh** button and it should start back up again. Make sure to click the Simulation button again if the screen refreshes and its unclicked.

Does this work?

**Yes.** In around 2 days since I started I have simulated over 85,000 games and run over 500 games for my character. Ranking up from the 10,000's to the top 100. With one browser window you get about a simulation completed every 1-3 seconds which gives about 30 simulations a minute. With a 9up gem farm you can do around 270 per minute give or take. _**Over an hour you could see anywhere from 10,000 - 15,000 matches simulated.**_

Within my first hour I had over 100 matches appear in the “My Matches” tab and I was well on my way to raising my rank.


Within a day I went from #5251 on the Red team to spot #972 and from #2074 on the Blue team to spot #199!

Time passes…

Now after over a week of farming and 500,000 simulations I am ranked up in the top 20 on the Blue team for Cavern Survival. So even in the most played multiplayer level, ranking up is feasible in a short amount of time.

Getting good results

I find that this process works best when I am watching TV. I can monitor the farm and restart any stalled simulations. I have noticed that after around 400 simulations the processes will end or stall. Individual results may vary, but you should only have to restart the processes every so often. If you are restarting them every 10 simulations then you might try closing down and re-opening your browser or trying at a later time. The process could get muddled by a lot of different factors. It does work though, so keep trying!

How many gems do I get?

According to @Nick there is an equation 20x^0.4 that is used to create gems: [quote="nick, post:1, topic:2769"] You earn 20x^0.4 gems and exp from simulating, where x is the number of games simulated, so you can snag a few hundred gems pretty quickly, but it will slow down a bit as you simulate more and more games. If you eventually simulate millions of games (thanks!), you can get quite a few gems: ![|690x82](upload://2y9CWKWD47QtCiBU43tR7AlEF5r.png)

But the first few hundred come quickly:


[/quote]
Need better gear? Earn gems for simulating games (Feb 2015)

So it looks like after 3 million simulations you can earn 8k gems. It may not be the “get rich quick” scheme that you were looking for, but free gems is free gems!

And if you have extra computers you can create a farm on each one logging in with your account. Multiply that by a classroom of computers and you could be swimming in gems in no time! Who said computer science wasn’t fun?

The Sweet Spot

Somewhere around 300,000+ simulations the payout will begin to level off. But after 350k you should have achieved somewhere near the following from Gem Farming: ![|690x71](upload://2ch1ExcLYVffRgyeoWriPe8aE6b.png)

As you can see I have currently 450k simulations. The payout if I remember right was well in the 3000+ gem range when I was at 350k simulations. You can achieve this within a week of simulating. So if you need some extra gems for equipment, this is a good way to do it. If you look at the prior image where @nick is at 3 million simulations you can see that the payout is only about double the amount shown above.

"Computer Multiprocessing Lesson" for Teachers

Gem farming can be an interesting way to introduce the concept of multiprocessing to your students. Basically each independent computer becomes a node in a "computing" system and the work of the problem of simulating all of the games is then distributed across this network. The computing power is "crowd sourced" form participants from all over the country.

By participating in multiplayer simulations your students are becoming part of the solution.

The simple truth

Without much effort you can run a browser window in your background simulating games, and over time it will add up! ▲ Top

 

Spectating

If you click on the spectate button you will get to watch the simulated games.

How it works

Pick one player on the red team and one player on the blue team by clicking on the empty box column at the end of their name row under the "Ladder" tab. A black **_<?>_** type of icon will appear to show which player you have selected. Then click simulate to watch the two players battle.

In a 10k ladder most of the games have two players that will sit around until one player dies. So I recommend choosing the different players to watch. At the moment this may require clicking more to display more players so try looking at matches between the players in the top 30. As the arena may start zoomed in this may or may not help but at least you will know who wins.

Clicking on the “Next Game” button will simulate another game.

If one played in a small tournament I could see a value in spectating as you would be able to see your friends compete. Perhaps in a class room scenario.

How to Leverage the Spectate Button

If you could see the entire match, watching players compete in the top 30 would be very useful for giving you ideas on different strategies to implement. This would also be useful to watch your matches again.

One can only spectate already simulated games

If you choose two players who have not yet been simulated, you will not get any response and just see a blank screen. If this is a game between you and another player, you can use the _**Fight!**_ link to simulate the game as long as you win and submit the game. The next time you choose to spectate that match it will show you the battle. ▲ Top

 

The More Button

By clicking on the “More” button you can display more rows under the “Ladder” tab. On the smaller multiplayer games this will allow you to easily list out everyone in the ladder. By using the browsers <CTRL-F> search function you should then be able to locate any other player to challenge them directly. For the larger ladders in multiplayer games like Cavern Survival it may become tedious to do this as it adds only 100 rows each time you click on the more button.
▲ Top


 

Guide to Multiplayer "Clan" Leagues

Clans seem to be a way to organize a League tournament. By creating a “clan” league, you can then invite your friends to this “clan” league and compete by simulating games. I do not know if having a subscription will allow you to simulate games only for your league, but with a subscription you can make your “clan” league private and restrict who can join.

How to Join a Clan League

You can join a "clan" league by clicking the _**Join Clan**_ button of one of the top 100 clans from the clans page. https://codecombat.com/clans

Or by entering the clan’s specific join link into the web browsers url. CodeCombat - Coding games to learn Python and JavaScript

Public “clan” leagues can be joined by anyone at any time. If you are a clan leader and do not want a person in your public clan, you will have to manually remove them. Subscribe and create a private clan if you wish to have control over who joins.

How to compete in the "Clan" League

After joining a clan click on the clan name to bring up the clan page

Then click on one of the multiplayer arenas that you would like to compete against other members of the clan in.

You will end up on the League screen, which is similar to the normal public multiplayer ladder except that you will only be competing against other clan members who signed up on this ladder. You will notice the clans name next to “League”, and how each team, red and blue sate how many players are in the “league” for that side of the tournament.

Choose a team by clicking on “Play as Red” or " Play as Blue" choose an AI/player to challenge and then submit your code for that side of the team. To rank up, you will need to simulate games. For public “clan” leagues when you click simulate the process will simulate other games not part of your current “clan” league as well. I believe that when you get to fight under “My Matches” it will take your character and pit it against another player in the league instead of against a player in the public ladder. But you may have to simulate many games in order to see your “clan” leagues rankings establish themselves.

Alternative place to find your clans

In the player Account → Profile area your clans will also be listed:

Leaving a Clan

If you no longer wish to be part of a clan you can click on the “Leave Clan” button from the main clan list or from the clans home page.

 

Listing your Clan to get others to participate in your multiplayer ladders

There is a sticky post in the forum for Clans. List your clan today and get started competing with your friends!

"Clan" League Ladder Results

After many simulations you should eventually see your league ladder statistics appear showing a ranking of your clans participating members. This is a nice difference from the 10k players that are in the “Cavern Survival” multiplayer ladder.


In many ways the “clan” leagues can be thought of as mini ladders for the multiplayer tournaments.

▲ Top

I wrote this with my current understanding of how multiplayer works. If I have made a mistake anywhere please let me know. And if you have anything to add that will be helpful for others please feel free to reply to this post. Need help? ask here as well and I will try to do what I can.

16 Likes

Revision 1.0 2016-09-03

3 Likes

Harry, you are the best. Thank you for this post!

4 Likes

Great work! I suggest pinning this topic! (if not yet done)

1 Like

Revision 1.1 2016-09-13

  • Added a new section to talk about the more button
  • Updated the Spectate section
  • Added the question Why can’t I get the VS Shaman CPU achievement?
  • Updated gem farming with my latest results
  • Added section on the Ladder tab and the effects of loosing and resubmitting code
  • Added an Index
1 Like

So after a few weeks of farming this is the result that I have currently

And Ranking:


And this was with a basic AI with good equipment and high level. So with determination you too can rank up.

The Winners Tab

A fourth tab may appear under the multiplayer area called "Winners". This tab lists the winners of the multiplayer tournament when it was held. I do not believe that this updates and is a record of the results from the public competition, not the "clan" League results.

You may be able to learn more about how to create a good AI and multiplayer game strategy by watching the battles on the Winners Tab of the top 20.

▲ Top


 

1 Like

Revision 1.2 2016-09-29

  • Added a section talking clan leagues
  • How to Join a Clan League
  • How to compete in the Clan League
  • Leaving a Clan
  • Listing your Clan to get others to participate in your multiplayer ladders
  • Clan league ladder results
  • Added the Winners Tab section
  • Listed clans as a 4th way to play multiplayer

exceeded 32k characters, the guide is now spilling into multiple post areas


Revision 1.3 2016-10-13

  • added @ant 's chart for calculating gems up to 5,000,000
  • added how to for playing friends on FaceBook and Google+
  • added a question for browser issues when simulating referencing @ant 's bug report post
  • Q: My browser has crashed / locked up from simulating games is this a bug?
  • added question for issues after submitting code and not seeing new matches
  • Q: I submitted my code for a ladder why don’t I see any matches?
1 Like

Question and Answer

_**Q: How to I compete with my friends?**_
Answer Click to View

A: There should be a way to do this via Facebook. I have not done this myself, so if anyone has more specific instructions on it, feel free to post a reply.

Multiplayer Games - #2 by nick (Jun 20115)


As @VincentMaths shows, it appears if you login with you FaceBook or Google+ account to the CodeCombat site there should be a link on the multiplayer screen to allow you to connect to friends. The link should look like the image below: ![|267x100](upload://qXhmp8iTm6cTOuXiO6CbPkeE4JB.png) ( Thank you @Vlevo for image )

Fighting a specific opponent on Ladder

Q: I cannot change my gear on team (blue/red)

Answer Click to View

A: Try “Change Hero” on a blue game.

Changing Gear for Multiplayer Blue Team (Nov 2015)

Q: How do I see my score for multiplayer?

Answer Click to View

A: There are two known areas to check.

The first place to look is at the bottom of the “Ladder” tab in the multiplayer screen. You ranking number, Score, and Name should be highlighted.

The second place is in the profile page.

How to find your multiplayer score? - #4 by dideler (Dec 2014)

Q: I am simulating (5k games have passed by) but I do not seem to see new games appear under my “Matches” tab. I am also not ranking up.

Answer Click to View

A: Change something in your code, add a comment etc, and resubmit

Multiplayer game not being simulated - #2 by nick (Mar 2015)

Q: I submitted my code for a ladder why don’t I see any matches?

Answer Click to View

A recommendation would be to start gem farming as the simulations sometimes stop. If no one else is simulating then you wouldn’t see a change in your ranking or new matches from what I understand.

Possible Error for Ranked Ladder (Dungeon Arena)

Q: Is multiplayer really worth playing?

Answer Click to View

A: Yes, actually. Apparently there were tournaments based on multiplayer with great prizes. Perhaps they will do this again?
CodeCombat - Coding games to learn Python and JavaScript

Q: How do I see the new gems I am awarded? How do I get the ladderville award?

Answer Click to View

A: Click the game sound button 20 times and you should see your gems update on the campaign map as well as an award display. As you play through the levels your new gems should show up automatically as well. So you don’t need to do this to be awarded. If you are trying to buy equipment and you don’t see the new gems, this might also be a way to ensure they show up before you go to the gear shop.

It is my understanding that your account gets the gems awarded regardless if you do this trick or not. This trick might just allow you to see an updated total.

← Click me 20 times

And this award will show up.

Then click the browsers refresh button and you should see more gems!

Q: How to Target the enemy hero in multiplayer

Answer Click to View

if (enemy.id === "Hero Placeholder 1")

Use this to your advantage.

Thanks @ant (Nov 2015)

Q: Why can’t I get the VS Shaman CPU achievement?

Answer Click to View

So this is a bit complicated. It appears at one point there was talk about awarding players for beating subsequent higher computer AI’s. However, if you look at the opponents in the “Play as Red” screen you will notice that there is no “Shaman CPU” name in the line up.

So the only way to play against the “Shaman CPU” is to click on its Fight! link in under the “Ladder tab”.

But this still will not award you the achievement even if you win this way.

The only way reported that you will get this achievement currently is if you randomly fight the Shaman CPU while having your game simulated. In a ladder of 10,000 players this is unlikely to happen.

You can read these posts for more information:
Zero Sum - that sums it up - not getting any achievement

Bug report
Wakka Maul: Fighting against the simple AI can also unlock other Wakka Maul achievements. · Issue #3241 · codecombat/codecombat · GitHub

Q: Is there a chart for how many Gems you can earn?

Yes there is! - Click to View

Thank you @ant posted here (October 2015)

Q: My browser has crashed / locked up from simulating games is this a bug?

Answer Click to View

If your web browser is actually locking up or crashing when simulating games there might be an issue. Read through the bug report to see if you are in a similar predicament and let them know on the forums that there may be an issue again.

Ladder game simulation crashes frequently · Issue #3202 · codecombat/codecombat · GitHub

Thank you @ant

▲ Top


3 Likes

Thank you so much for this detailed guide!

1 Like

help me please this Guide helped me a lot but I still can’t figure out what I’m supposed to code I am very new to this game please help me.

Do you mean in the multiplayer level?
If so, a simple attack code would start you off nicely. Remember the enemy hero can be found using hero.findNearestEnemy(). He/she is classed as an enemy.
Then maybe an if statement and a hero.attack()?
Does this answer your question?
Danny

1 Like

thanks this helped a lot! i was trying to figure out how many gems i earned😀.

1 Like

@Harry_the_Wanderer I updated the thread so it has a Table of Contents on the right side. :+1:

2 Likes

How can I gem farm. Bc i’m in the lvl where I need tons of gems but can’t get any.

You can simulate games on the multiplayer arenas, as it says above. Or, you could write clever code to win the level. If you still need help, you could make a new topic about the level, with your code, your equipment and your gems.

thx a lot for the help @Deadpool198! good luck!

I don’t understand how much simulated games i need for the achievement bc i’ve done about 200. I also don’t understand that xp and gem amount