Merge pull request #17 from jocelynlih/paul

Paul
Moving extension code into the extension file
Merge branch 'master' of https://github.com/jocelynlih/SwiftGameBook into ankur-refactoring
Merge pull request #18 from jocelynlih/ankur-refactoring

Moving Extension Code in Game Controller to Extension file
Add level select scene. Add level 1 physics collision setup.
merge master
Merge pull request #19 from jocelynlih/jocelyn

Add level select scene and level 1
[Everybody should read this stuff marked 'important' below]

Added support for Texture Atlases via the new art pipeline. This required a number of changes:

1. Scale issues related to having multiple image sizes (resolution/densities)
2. While fixing the scaling, I had to enable support for Universal platforms, which uncovered a number of other issues (also related to scale)
3. The art files were moved out of the Asset Catalog and placed into a staging area for use with the art pipeline.
4. Another bug was uncovered in XCode's level designer, in that it forces you to select a specific image file. You can't just pick "Cloud1" instead you're forced to select a specific resoliution ("Cloud1~ipad@2x" for example). Fixing this required a solution in the code to correct for this problem. You'll find this bit of code by searching for "!HACK!". If/When this issue gets resolved in XCode, we can fixup our Scene files and remove this hack.

! IMPORTANT !

With these changes, here's how we update our art for sprites using our new Texture Atlase

Before you begin:

  * First, make sure you have ImageMagick installed (http://www.imagemagick.org/)

    The script requires the 'convert' tool from that package.
    If you use MacPorts of Brew, then it's real easy to install.
    If you don't use MacPorts or Brew, shame on you. :)

  * Make sure your art is created as high-resolution art scaled for a Retina iPad.
    This means making sure it is the correct size, relative to a screen that is 2048x1536

  * Put your master art (SVG or PhotoShop or whatever) files in one of these appropriate places
    (or add your own):

	.../PencilAdventure/Art/Master/*

OK, you have your art and want to add it to the project. Here's all you have to do:

  * Add your game-ready art file (PNG, JPG, appropriately sized) to one of these folders:

     .../PencilAdventure/Art/Staging/Staging-Sprites.atlas (for game sprites that go into the atlas)
     .../PencilAdventure/Art/Staging/Staging-Images.catalog (for other images like backgrounds, etc.)

  * Go into terminal and change to this folder:

     .../PencilAdventure/Art

  * From that location, execute this command:

     ./update_art

That's it - it will refresh the entire texture atlas and both of our asset catalogs.

Note that at the moment we only have one texture atlas. We can split it up into multiple atlases as we see fit (if you look at update_art and add a line for your new atlast.)

For the time being, let's stick with one atlas and we can split it up once we get closer to the end when we know more about how the game will behave.