- Git (on OS X install via homebrew)
- Ruby 2.1.2 (we recommend using RVM)
- Clone this repository, e.g.
git clone https://github.com/ardell/phaser-starter-kit.git penguin-wars
where "penguin-wars" is the folder you want to build your game in. cd penguin-wars
again, where "penguin-wars" is the directory where you cloned the starter kit into.bundle
This installs ruby dependencies, such as your web server.
You'll build your game in the public
directory. We've started you out with Phaser's Hello World Example so all you should have to do is start building. public/index.html
is the page that will be served at /
, images
, javascripts (js
), and stylesheets (css
) each have their own directory within public
. Mostly you'll be working in public/js/app.js
.
Within your game directory, run foreman start
, then go to http://localhost:5000
in your browser.
To deploy your game to GitHub Pages...
- Create a GitHub repository for your game.
- Add your GitHub repository as a remote called "origin", e.g.
git remote add origin git@github.com:username/repository.git
where "username" is your GitHub username and "repository" is the name of the GitHub repository you created for your game. - Commit all changes that you want to be deployed.
- Run
rake deploy
. - View your game at:
https://[username].github.io/[repository]
where "username" is your GitHub username and "repository" is the name of the GitHub repository you created for your game.