Creation of the engine behind “Cube Jump” iOS game with Phaser

Did you play Cube Jump?

All you have to do is help your cube travel through space. Jump on moving platforms and avoid falling.

This is just another “endless runner” game and although it’s really basic, you may think you will need a 3D engine like Unity to create a game like this.

That’s wrong, since it’s just isometric, we can do the same game with a 2D framework like Phaser.

At the moment all we need is a sprite sheet with the three platform types:

In this image I used a black background but the original uses a transparent background.

Then, I just have to place the platforms on the screen, move them in a 30 degrees direction, and we have the engine ready for a cube to jump on it:

Each platform has been given a tint color. In the source code – fully commented of course – there are some hard-coded values, especially for platform position and delays, which you will need to change if you want to adjust the gameplay, but I would say the engine does its job:

Next time I will show you how to make the player jump on platforms, meanwhile if you have questions about the code leave a comment. You can also download the full source code.

  • John

    Hello,

    Can you please show how to implement highscore from id.net.
    I need as3 now, but they offer different features for flash, html5 and unity games.
    You can maybe create some tutorials about it.

    I did use some of them, but I do not know how to implement highscore?

    • Emanuele Feronato

      Did not even know about this service, I’ll have a look, it seems interesting.

      • John

        Yes, it is very interesting, many free features available, take a look.
        If you understand how to implement highscores, please make a small tutorial.

  • This is in the fundamental perspective, I think it would not be used much more