[SOLVED] Twisted Canyon - ruins

Hi Guys :slight_smile:

I got problem how to move next to ruins, how to attack them?

Please help :slight_smile:

I had a look, but my map differs much from one on your screenshot. Nothing like ruins)

If you are not trying to get the maximum coins, move back to your start point (the first red dot) and then navigate up and over to the X on the right of the map. Once you touch touch the X, the game ends.

Like Alexbrand, the map I had was much different…I think this is normal and to be expected.

Also, based on your screenshot, it appears that no other coins are obtainable…the ones to the left of the X cannot be taken, because you would have to step on the X to get to them.

hi, thx for answer , I got a question, how to navigate( is there a special method) my hero to X point?

thx . :slight_smile:

Hi @Zambi25, Welcome to the CodeCombat discourse.
I think you can navigate your way to the white X, without going past the ruins. In my seed (my version of the level), you can walk to places where it seems there are rocks, but in fact you can walk over them.
I’m not sure about this as I can’t play your level, but if you look at this screenshot :arrow_down: you will see that I walk to places which appear to be in the middle of the rocks. Maybe you can walk up to the X continuing going diagonally through some of the rocks. if you see what I mean.
Screen Shot 2020-01-19 at 13.06.33
Maybe you still can’t, I’m not sure… Have you tried reloading your code, then reloading the level to get a different seed?

1 Like

Anyone can help me,? I ve still got a problem to past this level

I tried reloading my code, then reloading the level and got a same seed

Maybe is some of bug?? Please help me

There is no way to move diagonally here because of level equipment limitations. But try hero.moveLeft(2) from (44, 38). Maybe that was meant as creativity in level describe, idk) Coins in this level are like bread crumbs, they lead you to right path.

I had to change browser and log out of account to get to this version of lvl map. But it’s possible to complete. There is no bug. Though, I don’t understand the purpose of such level design :roll_eyes: :hushed: :thinking:

1 Like

Success, I past this level , there was a crossing through the rocks

thx for help

1 Like

Well done Zambi25! I wish I had known you could walk thru some of the obstacles when I played this level…I passed it without, but would have been more satisfying to grab as much loot as possible :wink:

So, you can replay it)

I get maximum coins :wink:

1 Like

I just solved a version of Twisted Canyon I don’t see above. In my version I can defeat the three enemies with a while loop which runs three times before our hero comes to the X mark.
the while loop starts after hero moveLeft to reach the first of the three enemies:

while(true) {

var enemy = hero.findNearestEnemy();


the last line “hero.moveLeft();” makes the hero walk left when coming to the x-mark, but the line is needed to defeat the three enemies. I was thinking about an if statement like:

  if (hero postion != x:68, y:62) { 


Do anyone have an idea how to solve it? I am complete beginner. Just if you know how to use coordinates in a if statement.

Howdy and welcome to the forum!

To speak to your opening comment, everyone gets a different starting ‘seed’, so it is quite rare when 2 player’s match maps. Mine is quite a bit different from what you are showing.

Another point, tho you might already know this, but just in case: some walls are illusions and can be walked through.

So, there are several different ways to do the if coordinates statement. ‘hero.pos’ is actually the vector of the hero’s position. If you had your hero say it, it would look like “{x: 68, y: 62, z: 1}”. To keep it simple, try this method instead:

if (hero.pos.x != 68 && hero.pos.y != 62) {

I tested the code but it didn’t work, I checked and I got some odd code warning on the first line //comment… I checked and I am in Python for this particular practise. I can’t change it back but I was in Javascript when I started. Perhaps a bug, I will log off and in tomorrow to see again. But thanks for replying, I am sure it will work.

If you switched languages, understand that your code will not be auto-converted. It will remain the original language and you will have to convert it.

// is the code for commenting in JS
# is the code for commenting in PY

I did not switch language. Always in Javascript and that is what I coded in until I wanted to solve the problem you helped me with. When I returned to enter the code, it was in Python. Moving back to Kithgard Dungeon, the rest of the practise levels are still in Javascript. Only Twisted Canyon changes to Python. A known bug?

Wow…first I’ve heard of this happening, automatically. However, besides changing the language via the Game Menu, you can also specify the language via the link, like this:


So, if you encounter such a switch again, use the ‘codeLanguage’ switch to change it back. It works for all supported coding languages.

That link you sent me worked.

I added the the line of code and it worked like a charm… I mean gem.

I have another issue in the program that was discussed a year ago. It is the last practise level in the Game Develop 1:

In Tabula Raza:

game.spawnXY(“gem”, 68, 23);
game.spawnXY(“gem”, 60, 23);
game.spawnXY(“gem”, 52, 23);
game.spawnXY(“gem”, 52, 14);
game.spawnXY(“gem”, 52, 10);

ui.track(game, “collected”);

I can collect the gems but they don’t appear in the ui display as Collected (there is a “0” but not counting).

I was in the forum and they had this problem one year ago and I seem to have the same problem. Is there a solution. The collect gem code works fine in practise level “5. Gemactular”:

// Add a goal to collect the gems using game.addCollectGoal()

// Spawn 3 gems across the level for the player to collect:
game.spawnXY(“gem”, 28, 28);
game.spawnXY(“gem”, 28, 10);
game.spawnXY(“gem”, 64, 10);
game.spawnXY(“gem”, 64, 28);
game.spawnXY(“gem”, 58, 52);
game.spawnXY(“gem”, 44, 44);
game.spawnXY(“gem”, 58, 52);
game.spawnXY(“gem”, 28, 59);
game.spawnXY(“gem”, 28, 44);
game.spawnXY(“gem”, 19, 44);

Why is it a difference here? I promised to post your answr in the forum for people who wonder the same.

Kind regards