jocelynlih/SwiftGameBook — pull request #83 by nettlep (2014-08-21 09:52:56+00:00)
Title: This update changes how we build levels.

We no longer have to setup physics on sprites in the level designer.

We also do we have to setup the contact/collision/category bit masks. It was actually dangerous to do this because the level designer only allows you to enter constant values and it's up to the coders to make sure that the symbolic constants assigned to the various categories were kept in sync with that.

To resolve these issues, the levels were cleaned up to remove any/all physics bodies from them as well as any of the category bit masks.

The way it works now:

1. When you drop a sprite in the level, choose the 1x ipad image as the texture (i.e., box~ipad.png).
2. Set the name of the sprite to the texture's base name ("box" for "box~ipad.png")
3. Assign it an optional attribute in the sprite's name field. Attributes are separated from the name with a vertical bar ('|') charcter. If no attribute is assigned, it's considered a normal platform item that Steve can jump on. Possible attributes are:
"finish" - the finish line
"death" - the deathtrap (touch this object and die)
"background" - behind everything else and no collisions
"powerup" - powerup item

Example sprite names:

"tv" (no attribue, standard level item)
"girlPicture|background" (backgrond item just scrolls behind everything else)
"sharpener|powerup" (I think you get the idea)
"blueBox|tardis" (this isn't real - just testing you)