Introduction to Phaser
Phaser is a free and open source JavaScript framework for building games and multi-media applications using HTML5. It’s primarily used for building games that can be played on the web / in a web-browser - but it’s also possible to use it to build releasable games for iOS, Android and even standard “Desktop Apps” on Windows, macOS and Linux.
Thousands of developers are using Phaser worldwide to build games for the web and mobile. It has a healthy community and Phaser related questions get answered pretty quickly on Stack Overflow. That makes it a great framework to start testing out Game Development - especially as you’ll be learning to program with JavaScript, which is a very versatile language for the web.
While being an open source project, Phaser is owned by a company called Photon Storm, who actively develop and maintain the code. This gives you the best of both worlds, as the open source nature means you can see how the code works and change anything you need too but the fact it is backed by a company means there is a high level of support and a low-risk future for using the framework.
Phaser Editions
There are currently 3 different versions of Phaser;
-
Phaser 2.6.2: This is the last official release for Phaser v2. Photon Storm are currently working on a new version of Phaser (Phaser 3), but that’s not likely to be ready until 2018.
-
Phaser CE (Community Edition): While Photon Storm work on Phaser v3, the community are still hard at work fixing bugs and adding small features to Phaser 2. Phaser CE is based on Phaser 2.6.2 but includes some additional work done by the Phaser Community since.
-
Phaser 3: Phaser 3 is the next generation of Phaser which is currently work in progress. It’s likely this won’t be released until early 2018.
We will be using Phaser CE 2.8.2 for this course.
Useful Resources
Phaser has a large community and there are a lot of resources available to help you while developing with Phaser. Some are listed below;
Phaser API Documentation: The documentation is a very complete technical list of all of the classes that Phaser has to offer. It can be a bit heavy going, as most pages are just a big list of variables and methods (functions) that are made available by a certain class - but it’s very accurate and complete and should be considered the definitive source of information about how a function works.
Phaser Examples: This library contains hundreds of example games built in Phaser. These examples are incredibly useful for seeing how other people have added certain features to their games or when trying to figure out just how a Phaser function is supposed to work. You should feel free to visit some of these examples during your course, especially when you move onto the Side Quests!
Phaser Sandbox: This online sandbox allows you to write Phaser code directly into your web-browser. We won’t built our final project this way, as we want to be able to share our project on the web, but the SandBox can be useful for just trying out little bits of Phaser code. It helps you spot syntax errors early on and makes it super fast to test out small things.