Creation of a “2 Cars” HTML prototype using Phaser and Arcade Physics

One of the greatest thing a developer can do is reuse the code as much as possible.

Last week I showed you the creation of Rise Above HTML5 game, and today with some minor changes I turned it into a 2 Cars prototype.

In this game you control both the red car and the blue car at the same time. Collect all the circles and avoid the squares on the road.

With some minor changes to the original source code I made this prototype:

Click in a lane to make the car change direction, avoid blocks. A scoring system will come later this week, meanwhile have a look at the source code:

As you can see both the source code and the logic behind it are very similar to the ones seen during the making of Rise Above. And of course you can download the source code.