“String Avoider” HTML5 game updated to Phaser 2.6.2

As you know, Phaser 2.6.2 is the latest and last official Phaser version, so while we are waiting for Phaser v3 I am updating the oldest prototypes to 2.6.2 in order to have a set of prototypes working with the latest Phaser version.

Last month I started with Space is Key, and now t’s time to revamp String Avoider.

The original game was published in 2006, more than 10 years ago, but the game is still fun.

« Avoid colliding with walls and guide your string through each unique level. Time is of the essence as you must steadily travel through 26 levels to victory. »

And this is what we are going to create:

If you have a mobile device, you can play it directly from this link.

Move the mouse around the canvas to make the string move, and watch how it reacts when it touches an obstacle.

The game field is made by one single PNG blue image with transparent background.

The string is an array of points with lines joining such points. Really easier than you may think.

That’s why the source code is so short, although I commented it line by line:

Next time I’ll show you how to add animated obstacles, meanwhile download the source code.