Monday, August 11, 2014

Adventures in Phaser.io

With the Christian Game Dev contest coming up, I decided to use a game engine I've wanted to use for a while.  There's a web game engine called Phaser, written in Javascript that uses Canvas or WebGL for rendering and HTML5 for audio.  The documentations and community is awesome, they even have an IRC chat room where you can get instant community support!

The Competition


For the competition theme this year, you could pick from one of three verses.  I chose the Hosea 6:6 verse which says something like, "For I desire mercy, not sacrifice, and acknowledgment of God rather than burnt offerings."

Yer a pirate yarg!

In my game you're player is a pirate and you go around collecting treasure and fighting while running from the King's men.  At one point you get caught, told the truth and are given the option to be pardoned and join the King's men or be banished.  After you join the King's men you are given a new sigil, clothes and a mission to recover the King's treasure/keep the peace and offer the same deal to any other pirates you encounter.  Get it?  I know, I'm no C.S. Lewis, but it's one of my favorite CDN game ideas so far.


Booty!
I spent too much time on creating assets and just figuring out how to work with Phaser, and then went on vacation half way through the allotted time, so I never finished it.

Pirate sprite sheet

I used Tiled for making the levels, photoshop for all the art and did my coding in Sublime.

Custom props!

In the end I would say that Phaser is a good engine for creating a web game.  It has just about every kind of example you need to make your 2D game.  The downside of Phaser, for me, is that it is written in Javascript and I have yet to find an editor that I really like for Javascript.  XCode has ruined me with it's code completion and super easy navigation.  With Phaser, I was constantly flipping back and forth between the API in browser and Sublime, where as in XCode I would use auto-complete or cmd+click my way to the header files for whatever I was working on and rarely have to use my web browser for anything.  Sooooo much faster!

If you have to chose a platform for a web game, I'd say Phaser is one of the best I've seen, but if you don't really care so much about open source and not needing any plugins you can always join the herd and head over to unity3d.com