Play Home Contribute GitHub Join Us Discourse Staff Members GitHub Contribution Guides Team

Rewards for multiplayer levels


So I’ve been thinking about this off and on for a while and finally actually like my formula.

Here is my idea for rewards on multiplayer levels:

At the end of each month all multiplayer arenas grant gems to the top ranked players. The formula would give value to everyone in the top 100 positions on either side (though you only collect once). It should be set that the differential between rank 2 and 1 is higher than the differential between rank 100 and 99. You only get gems that are more than you have previously earned.

G® will be the formula for calculating gems for a given rank.

G® could have a variety of forms and should incorporate the world into the calculations. My first thought is:

G® = 0.1 * W * (100 - r + 1) ^ 2 #This would grant a maximum of 1000 gems for being #1 in a dungeon arena, and 5000 in the glacier. It also gives a difference of 19.9 gems for moving from #2 to #1, but only a difference of .3 gems moving from #100 to #99.

Changing to:
G® = 0.001 * W * (100 - r + 1) ^ 3 #This would have the same maximum values, but would be even more strongly pushed toward the top ranks. 29.7 gems from #2 to #1 and .007 from #100 to #99.

These are just 2 examples, it could be created in order to shape the reward line however we wanted.

In any case, the actual rewards would be something like this:

January 31, you are ranked #1, you get G(1) gems. February 29, you are ranked #1, you get nothing because you’ve already earned the top rank.

January 31, you are ranked #90, you get G(90) gems. February 29, you improve to #19 and earn G(19)-G(90) gems.

What do you think?


A few remarks:

  • generally it’s a good idea (I :heart: it)

  • checking once a month may be too rare: you may be the top player all month, but if you lose a few positions on “payday”, you’re out of luck – check the ranking every day

  • compared to the simulation rewards, this is probably too generous (remember, you get ~5000 gems for the first 1 million(!) simulations)

  • the ^3 formula is too steep: you would get a negligible amount of gems (less than 150) if you’re below rank ~50…70

  • how about giving out gems to the top 1…2(…5?) percent of players, instead of the top 100? (100 in Cavern Survival is 0.15% of all players, but in Harrowland it’s 3.5%)

  • …and/or make the ranking based on score limits? (e.g. above 5000)

  • contest winners (Zero Sum, Ace of Coders) will obviously benefit the most

But why hassle so much, why not just give away free gems to everybody?! :slight_smile: :joy:


I agree on the points ^ this guy made, instead of top 100, go for the top 1 or 2% or, above so much score. the dueling-grounds for example has 54465 entries in the red team. Getting in the top 100 will take months, and how fast you get there is random chance based at that point, depending on how valuable your opponent is. (I’ve been stuck on rank 400-500 for days now, only going up by 1-10 ranks per day at a max, yet only winning matches).

I’ve changed the script a bit after suffering a loss I could’ve won with a code adjustment (walking into walls etc).

I also agree that once per month isn’t the way. The more often it pays out, the more inclined people are to use it.

Anyway, I want to say I’m all for having multiplayer become rewarding. In my oppinion it’s the part that keeps challenging you to do better and work around problems. Whether the rewards are score based, rank based or ‘per victory’, it’s something I think will encourage more compatitiveness, because right now as far as I understand, investing into the multiplayer is basicly ‘wasted effort’ for players, where it could be a major aspect of the game.


Hopefully connected with this would also be a better implementation of match making between players to help people get ranked more quickly. But yes, I could easily agree with the rewards being awarded for lower levels.

How bout something like this:

Each of these achievements is worth an award
Submitted code that has at least 1 win = 100W
Top 50% of submitted code (on either side) = 100
Top 2% of submitted code = 300W
These three achievements are cumulative earning a total of 500

On top of this there is a tiered system where you only get the highest you have achieved, I’m thinking setting the tiers at 0.1% intervals with the final tier being #1 on the board with a reward of 500*W.
1.9% = 10W
1.8% = 21W
1.7% = 33W
1.6% = 46W
1.5% = 60W
1.4% = 75W
1.3% = 91W
1.2% = 108W
1.1% = 126W
1.0% = 145W
0.9% = 165W
0.8% = 186W
0.7% = 208W
0.6% = 231W
0.5% = 255W
0.4% = 280W
0.3% = 306W
0.2% = 333W
0.1% = 361W
0.0% = 500W (top player)

Added to the 3 achievements you could earn as much as 1000*W total. And yes, maybe this is deemed as too high. I don’t remember how many gems the best level in the dungeon earns, but a total of 500 gems doesn’t seem to outrageous to give to the best 2%, and 1000 gems for the absolute best code.

As for when the checks happen, daily checks could also be ok.


Thinking a bit more about the question, I came up with more elaborate suggestion:

It would be nice to reward and encourage everyone to take part in multiplayer, so I suggest giving gems to everyone who participates.

After all, if they beat the AI and submitted their code, they just completed a level! And although Cavern Survival may be easy to beat, Zero Sum or Ace of Coders is not.

Obviously, the lowest ranked players should get only as much gems as after an average (or easy) level on the same world (e.g. W*100). But this basic reward should increase with their performance. So probably the formula in the original post could be extended for everyone, although modified to be more “steep”. For example:

G(r) =  W * 100  +  10 ^ -9 * W^0.5 * (100 - rank[%] + 1) ^ 6

This would give give:

  • ~100 gems to the bottom 40% in Cavern Survival, while giving a maximum of 1000-1100 gems to the top 3% players
  • ~300 gems to the bottom 40% in Harrowland, while giving a maximum of 1800-2000 gems to the top 3% players
  • ~500 gems to the bottom 40% in Ace of Coders, while giving a maximum of 2500…2700 gems to the top 3% players

In fact, this would be very similar to @dwhittaker’s second suggestion, only a bit more fine-grained (although that may not be necessary).

In addition to the above, there could be also additional achievements for participating in multiplayer, e.g.:

  • Entered the multiplayer world: 100 gems, 100 xp – 1st multiplayer code submitted
  • A real PvP hero: 500 gems, 500 xp – minimum 5 multiplayer level codes submitted

The gems and xp could be properly adjusted, obviously.


I have a proposition. Players could choose to give themselves a handicap, such as starting with half health or not being able to summon troops throughout the round. If they win matches, they get bonus gems for their victory. To balance it out, If they choose, say, the half health handicap, yet still have about the same amount of health as their enemy or more, (e.g. Cavern Survival/Dueling Grounds), then they receive less reward than if they fought someone with twice the handicapped health. This could also work for some repayable levels.

	Possible Handicaps:
  1. Standard:
  • Start With Half/(3/4)/(1/4) Health
  • Set amount of coins through the Round*
  • Unable to Summon Troops/A certain type of troop (NOT manually selected)*
  • Cannot heal (Wizards/Boss Star 4+)
  • Permanent Slowness
  • Percentage of damage done to Enemies reflects back
    Specialized for Level:
  1. Cavern Survival:
  • Automatically grown enemies
  1. Deuling Grounds:
  • Standard
  1. Mirror Matches:
  • Lesser Equipment (The weaker, the more rewarding)

*Only applicable if player equips boss star


It’s pretty tough to make these achievements based on score or ladder rank work for existing levels with tens of thousands of players and for new arenas that only have a few. We recently were thinking about this and came up with the following idea, which is actually easier to implement and should work really well both for newer arenas and for people playing in private arena instances where they aren’t looking at the main ladders.

Each ladder comes with five levels of prepopulated AI challengers:

  1. Munchkin (the current Simple AI), very easy
  2. Shaman, easy
  3. Brawler, medium
  4. Chieftain, hard
  5. Thoktar, very hard

Achievements per arena come from beating those particular opponents, who are specially marked on the ladders. Haven’t figured out the actual tiering yet but will look at these numbers when implementing these soon. I guess the achievements come from playing as humans and beating these opponents on the ogre side. (Not sure if the same solutions are submitted on the human side, too?)


I read some of the other suggestions in this thread, and I agree with our current implementation. You will gain extra gems/xp based on what difficulty of AI you have beaten. I find this the best solution as we can give players defined goals to accomplish. Submitting winning code against the simple AI will prove that they have an understanding of what they are doing. If they want further challenge and gems/xp based on their skill, they can challenge the Easy/Medium/etc difficulties. We establish that immediate feedback loop of ‘that code was harder to beat, and you did it!’. I feel that is a better feeling to convey to the player instead of watching the leaderboards weekly/monthly hoping they broke the #500 spot. That way we can reward understanding/talent instead of luck in which games were simulated and how often they had been simulated.

Thoktar level difficulty will come with immense rewards. Can you think of a solution that beats the last Zero Sum and Ace of Coders champions?


This sounds pretty good and fairly easily implementable. Awesome! Can’t wait to take down Thoktar. I hope Thoktar is difficult even with really good gear.


The new achievements/bonuses are not working as expected: I tried some new code for Treasure Grove – I submitted it as red team, but I only get the bonus for tier 1, even if I select the hardest level to play against.

Then I submitted my code as blue team, but I didn’t get any of the bonuses (see screenshot below). Again, no matter which tier I select.



That’s probably because you selected to play against a player—pay attention to the opponent selection screen, there’s only a single AI (“Simple AI”) and the other opponents are players:

It seems the AIs are not fully implemented yet, or the opponent selection hasn’t been updated to list them.


Well, there is something definitely “missing”. On the screenshot you see the different icons for the different tiers (easy = shaman, hard = thoktar), but you fight against players, not the different AIs…


Also, there is no way to choose an opponent AI when you enter the level from the world map (it always plays against the “Simple AI”).

I think @nick mentioned that the CodeCombat team is working to improve the multiplayer levels’ UI/UX, hopefully this is on their track. :smile:


Yeah… I was looking for the AIs for Treasure Grove. I haven’t updated my armor since the Kithgard Dungeon…

At least you get different levels of opponents… I get the choice of warm-up or easy which is kind of funny actually…

Warm Up or Easy

(only for treasure grove where I am have over 200 wins and my only loss was to an Anya without the boots of speed because she never came close enough to imprison.)

(My losses are actually more fun than my wins… My code is constantly finding new ways of loosing to completely random people)


Has any of the rewards been implemented yet? I only get a reward for the first simple AI completion and after that, I can fight other tiers but I don’t get a reward. Also I see players names in the tiers.



The idea is good.
I think it would be a good idea to add a link for performance achievements “Defeat shaman”, “Defeat
Brauler” etc. That will be a good stimulus to improve MP games logic for players.