Get the full commented source code of

HTML5 Suika Watermelon Game

Talking about Puppet Bird game, Game development, HTML5, Javascript, Phaser and Users contributions.

Some days ago I showed you a HTML5 prototype to drag and rotate a wheel and control your character like in “Puppet Bird” game.

I built it with Phaser and a plugin to handle drag rotation, but @mobiadage simplified a lot my prototype and was able to achieve the same result with a few GDevelop events.

Look at his version of the game:

Rather than handling drag events, @mobiadge placed a marker in the same spot of the knob, and determined drag rotation as the difference between current and previous marker angle.

Some adjustments are needed to deal with positive and negative angles, and also to prevent the marker to rotate too fast when we move the mouse close to its center.

What a brilliant idea!

So I opened GDevelop to build, starting from @mobiadge concept, an even simpler version:

It’s basically the same stuff, but I clamp angle difference to prevent the marker to rotate too fast and use GDevelop native method to compute angle difference.

Look at the result, I left the maker visible for a better understanding:

Drag and rotate the crank to raise or lower the bird.

Same result, no code. Next time I’ll write a Phaser version of this concept, meanwhile don’t forget to follow @mobiadage on Twitter and download the complete GDevelop project.

Never miss an update! Subscribe, and I will bother you by email only when a new game or full source code comes out.