Down the Mountain movement HTML5 prototype: going down the mountain

Last week I showed you the hexagonal concept behind iOS blockbuster Down The Mountain based on my tutorial how to find adjacent tiles in hexagonal maps – ALL and EVERY case explained, now it’s time to make the player actually go down the mountain.

You will play with left and right arrow keys, to go down respectively on the left or on the right of the current block/hexagon.

If you reach the bottom of the mountain or fall from the left or right edges, you will restart. Have a look at what we are going to do:

Move the player with left and right arrow keys.

The code is not optimised at all so it’s still uncommented, but I am adding comments – and features – next week, meanwhile have a look at the code:

Next time I am going to add deadly tiles and scrolling, to turn this prototype into a full endless runner game, meanwhile you can download the source code of the entire project.