View Solution issues


I would like to talk about viewing solutions in general. I’ve just finished 6th sarven siege difficulty and wanted to see my own solution as well as check some others to learn something. I was really surprised when I realized that most of top solutions are bugged - in fact they abused properties of enemies when they could be changed, so instead of playing a level player would simply set their health to zero, effectively killing them. This does not work anymore (I guess), which is great… however viewing solution shows last used code after the ‘submit’ button has been clicked (or even ‘run’ button to test if you’re fine with your code). This leads to opening solutions and viewing empty codes, or straight up broken stuff which doesn’t make any sense - thus I can’t view my victory, as I’ve changed my previous code when I was trying to come up with something new for the 7th one.

My question is:
Is this working as intended and players can/should remove their codes if they wish after they’ve solved a level? I understand that in some cases this might be a bad thing, as someone could copy someone’s else work and beat the level with others’ code, but as it is right now I think it doesn’t do any good - it can’t be used to see someone’s solution, nor working game without any code, I think it’s quite useless at the moment. Thoughts? :slight_smile:


Excellent observations!

I fully agree that “View solution” should actually show the code submitted for the given leaderboard entry. However, it is likely that CodeCombat is only saving the latest code that the player entered in the level, therefore fixing this may have a relatively high technical cost.

Another problem, as you’ve noticed, is that outdated solutions are not removed from the leaderboards when levels are updated or exploits are fixed. I believe @nick has commented on developing the means to remove such entries from the leaderboards, but I’m not sure if there was any progress on this part.


There’s one more small security issue which is not really any problem at the moment but the top 5 submissions which are not meant to be displayed/viewed by the user can be in fact viewed. I’m guessing fixing leaderboards is not a high priority, but I wanted to bring some light as there’re several topics where people are asking about others’ scores and how it is possible. Codecombat saves only the latest code and the latest gear assigned to hero used which beaten the level, as far as I can tell. :slight_smile:


Yeah, it’ll be good when we can make sure the leaderboards are 1) updated when old solutions and hacks are fixed and 2) represent the code/gear at the time the level was beaten, not the current state. I have some bugs for those filed, just can’t get to them yet.

What method are you using to view the solutions of the top five? It sounds like we need a new bug for that here:


I’ve written private message explaining how this bug works, if you’ll need screenshot or anything I’ll gladly help tomorrow as I have to go for the rest of the day.