Getting started with Phaser

Part 4 - Choosing an Editor

You're going to need an editor in which to prepare your JavaScript code. There are many available, each with their own strengths and weaknesses. If you're an experienced developer you will probably already have your own preferred editor, in which case carry on to Part 5 of this guide. Otherwise here are some options for you:

Sublime Text

This is the editor the Phaser team use for building the framework and examples. It's even the editor this guide is being written in. Sublime should be considered as an extremely powerful text editor rather than an IDE. An IDE is an integrated development environment, that often bundles additional features such as built-in web servers, source control and code in-sight / completion. Sublime focuses on being an amazing editor first and foremost, and its multiple cursor and mini-map features are two of the most time saving we've ever come across in decades of development. Using a comprehensive Package system you can enhance it in multiple ways.

The full version costs $70 but is worth every penny and is available for Windows and OS X.

Sublime Text

WebStorm

JetBrains WebStorm is an extremely advanced fully development environment. It goes well beyond simple code editing and offers all of the high-level features you'd expect from a proper IDE include code-insight, npm built-in, code style/syntax reports, source control and a wealth of other features designed more for web developers than game developers. It's based on IntelliJ IDEA, a heavily Java based editor, which is both a good and bad thing. For a start the actual code editing experience is nothing like as smooth and freeform as with Sublime and OS integration is weak, but the power features can often make up for that. Having errors with your code spotted for you, before you've even tested your game can be really useful. And code-completion is great too, although obviously somewhat limited by the myriad ways JavaScript can be written.

The full version starts from $49 and is available for Windows and OS X. There are often deals to be found on the JetBrains site too.

JetBrains WebStorm

Visual Studio

This should only really be considered if you wish to write your game using TypeScript instead of JavaScript. Phaser has a TypeScript definitions file available, which allows you to use Microsoft's new ES6 inspired language to develop in. This gives you access to a statically typed language, with traditional class inheritance, interfaces and most of the OO style trappings you may be used to in other languages like AS3.

The full version varies in cost and Microsoft do great student details. Naturally it's only available for Windows.

Visual Studio

Brackets

Although primarily developed for building web site code, Brackets has really come into its own lately. It's a free open-source code editor and runs across Windows, OS X and Linux. It's actually written in JavaScript and is incredibly hackable, with new versions and extensions released every couple of weeks. It has a modern and dark UI, probably familiar to anyone who uses Adobe CS. It's well worth considering, especially if you're after a free editor.

Brackets is a multi-platform and free open-source product.

Brackets

Part 5: Downloading Phaser