npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

slush-relish-es6-phaser-project

v0.4.10

Published

A slush generator for createing phaser games using es6 module system - forked from pixelpicosean/slush-phaser-project

Downloads

6

Readme

Phaser Slush Generator

NPM

NPM version Dependency Status

A starting point to build a game with Phaser, using "ES6 modules" to organise your code.

Features

  • easy workflow lets you focus on crafting awesome games
  • ES6 features supported
  • state and prefab generator
  • Simple class system
  • gulp (a build tool of choice) build insanely fast via node stream api
  • lighting fast development rebuild system
  • live reload on all resources
  • deploy with one line command

Frameworks and tools used to make it possible:

Pre-requisites

You will need to have node, gulp and slush setup on your machine.

How to install

Simply run the following command:

npm install -g slush-relish-es6-phaser-project

Getting started

Basic

Navigate to where you want to develop your game (you can create a new folder too if you like).

$ cd /path/to/folder
$ mkdir phaser-game
$ cd ./phaser-game

Then call the slush template to begin.

$ slush phaser-project

Finally run gulp to launch a server.

$ gulp

Generator

After installed there should be a phaser command in your PATH, try phaser --version to check it. Now there's only generator support from the cli command, maybe project or some other features will be added, but I dont have any idea about that. Feel free to tell me what you think :D

NOTE: to make generator work as you want, please locate to GAME_ROOT instead of GAME_ROOT/project.

phaser [command] [options]

Commands:
    g|generate         // Generate a new state/class extension with ES6 support

Options:
    -h, --help     output usage information
    -V, --version  output the version number

Command-Specific Help:
    phaser [command] --help

Sample Usage

Generate a new state called Credits (automatically goes in the states folder):

phaser g state:Credits

Generate a new sprite Actor:

phaser g sprite:Actor

Generate a new sprite Actor in actors folder:

phaser g sprite:actors/Actor

Workflow

The workflow introduced below is recommended but not forced which will just make your life easier :D

When editing source code, make sure you update the files within the src directory. These files will then be compiled and reload for developing or compressed and added to the dist directory for publishing.

ECMAScript 6 features are supported with help of Traceur. This means you can write code with syntax which is going to be supported officially by Phaser 3.

Analytics

Google analytics have been included so that you can track user actions. This is useful for seeing how far the user gets, which in turn will alert you to any bugs or levels that are impossible to complete.

To track an event, just add the following code anywhere in your game:

game.analytics.trackEvent('action', 'label', 'value');

Only the action is required, but you may want to add extra options, such as health, level or simply what just happend.

Why ES6?

"Perhaps by early 2015 we ought to be looking at going purely ES6? Moving to using more advanced native browser features like Object.observe and Promises." -- Richard, the author of Phaser.io

Thanks

This project is a fork of the slush-phaser-project by Sean Bohan


The MIT License (MIT)

Copyright (c) 2014 Relish / Anthony Sapp

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.