Skip to content
Browse files

A bit more commentary on how the map works.

  • Loading branch information...
1 parent 241b4f0 commit 78fdd10f35a074f34eb2eea3a7594a923275193b Greg DeKoenigsberg committed Jul 5, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 resources/tutorial5/bundle-map-labyrinth.js
View
8 resources/tutorial5/bundle-map-labyrinth.js
@@ -6,7 +6,9 @@
["tiles","resources/tutorial3/gfx-puzzle8.png"],
],
- // Tiles...
+ // Tiles. Basically, this says: "tiles in the file above (gfx-puzzle8) are
+ // 30 pixels high and 30 pixels wide, and there are 10 tiles per row. So the
+ // first 10 tiles are 0-9, the second row of tiles are 10-19, and so on.
addTiles:[
{id:"tiles",image:"tiles",tileh:30,tilew:30,tilerow:10,gapx:0,gapy:0},
@@ -58,6 +60,10 @@
'xxxxxxxooxxxxxxx',
'xxxxxxxooxxxxxxx'
],[
+ // The tile mappings that correspond with the
+ // tiles defined in addTiles, above. The
+ // character "x" in the map represents tile
+ // 30, and so on.
[30,"x"],[31,"."],[39,"o"],
[11,"1"],[12,"2"],[13,"3"],[14,"4"],[15,"5"],
[16,"6"],[17,"7"],[18,"8"],[19,"9"],[10,"0"],

0 comments on commit 78fdd10

Please sign in to comment.
Something went wrong with that request. Please try again.