An open API service indexing awesome lists of open source software.

https://github.com/phasereditor2d/phasersublimepackage

Sublime Text packages for Phaser development
https://github.com/phasereditor2d/phasersublimepackage

Last synced: 3 months ago
JSON representation

Sublime Text packages for Phaser development

Awesome Lists containing this project

README

          

# Phaser Sublime Text Packages

This is a set of Sublime Text packages to help developers to code HTML5 2D games based on [PhaserJS](https://github.com/photonstorm/phaser).

## Smart coding

We use a modified version of [tern_for_sublime](https://github.com/ternjs/tern_for_sublime) to get JavaScript smart coding, in addition to a generated Phaser plugin using the [Phaser Editor](http://phasereditor.boniatillo.com) tooling.

This is a list of what you get:

1. Phaser API auto-completion
2. Jump to definitions
3. Jump back
4. Select all references (useful for renames)
5. Describe (tested on Sublime Text 3)

For more details checkout [tern_for_sublime](https://github.com/ternjs/tern_for_sublime).

WARNING: for a good code completion you should follow certain coding style, to help the type inference engine, read more about it in [this issue](https://github.com/boniatillo-com/PhaserSublimePackage/issues/1).

## Installation

0. Install [nodejs](http://nodejs.org)
1. Open Sublime Text
2. Open the Packages folder: go to `Main menu > Preferences > Browse Packages...`
3. It opens the OS explorer in the package folder.
4. In that folder copy the content of the [packages](https://github.com/boniatillo-com/PhaserSublimePackage/tree/master/packages) directory of this repo.
5. Restart Subilme Text
6. Open the [phaser demo project](https://github.com/boniatillo-com/PhaserSublimePackage/tree/master/demo/sublime-projects/phaser) and test it coding on the `game.js` file.
7. Warning: there is an issue if you add `phaser.js` to your project. Please, rename it to `phaser.min.js` until we fix it.

The demo project has nothing in special just that you should put in the root a [Tern project file](http://ternjs.net/doc/manual.html#configuration) (`.tern-project`) and add there the Phaser plugin.

To enable automatic completions read [here](https://github.com/ternjs/tern_for_sublime#automatically-showing-completions).

## Thanks

Special thanks to [Angelo Zerr](https://github.com/angelozerr) for his very kind support on everything related to ternjs.

## Found a problem?

Create an issue here!

## Alternatives

[Phaser Editor](http://phasereditor.boniatillo.com/blog/features) a complete IDE for Phaser games development.

## Screenshots

Phaser API auto-completions:

![completions](https://github.com/boniatillo-com/PhaserSublimePackage/blob/master/demo/screenshots/Autocompletion.png "Phaser API auto-completion")

![method help](https://github.com/boniatillo-com/PhaserSublimePackage/blob/master/demo/screenshots/MethodHelp.png "Phaser API auto-completion")

Tern commands:

![commands](https://github.com/boniatillo-com/PhaserSublimePackage/blob/master/demo/screenshots/TernCommands.png "Tern commands")

Basic `.tern-project` file:

![tern project](https://github.com/boniatillo-com/PhaserSublimePackage/blob/master/demo/screenshots/TernProject.png "Tern project file")