Create a HTML5 game like “Pudi” using Phaser – Match games meet Tetris

Did you play free Pudi game made by Jambav?

It’s an addictive game where you play with falling dots in an endless arcade. You control four big colored circles at the bottom of the screen. Small colored circles fall from the top of the screen, and you have to match falling circles with bottom circles.

To make them match, you have two ways to control the four big circles: with a double tap, you switch the upper circles. With a vertical swipe, you rotate all the circles, clockwise or counter-clockwise according to swipe direction and position. Same thing for the horizontal swipe, although the game should be played mostly with double taps and vertical swipes.

In this first part of the series, we’ll see how to create the player interaction with the game:

Double tap/click to switch the upper big circles, swipe to rotate all circles.

Everything has been made in less than 100 lines, still uncommented because it’s just the first prototype, but you’ll have the usual line-by-line comments once the game is completed

The game uses Phaser CE v2.7.5 but also works with the latest official Phaser distribution, 2.6.2

If you are an old time reader of the blog, you’ll see there’s nothing new in the code, I just want you to have a look at line 34:

game.input.onTap.add(this.handleTap, this);

I am using the onTap event which also allows me to detect double taps.

Download the source code and have fun.