HTML5 prototype of “Pop the Lock” iOS blockbuster using Phaser – step 2

Here we go with the second step of “Pop the Lock” game . In first step we saw the basics of ball placement and bar movement, now it’s time to improve the prototype adding game mechanics.

It’s game over if you stop the bar outside the ball or if the bar completely crosses the ball. To make the game simpler, when we place the ball on a new place, this place must be at least 40 degrees far away from the previous spot.

Try to play:

Click or tap when the bar is over the ball. Otherwise, it’s game over and you must reload the page.

And here we go with the fully commented source code:

We are only one step away from the complete game, with level progression and local storage to keep players continue the game. Meanwhile, download the source code.