grapefruitjs/grapefruit — pull request #78 by carterza (2013-11-13 05:12:25+00:00)
Title: Isometric tile maps

Alright, changes abound that definitely need review :
IsoTileLayer:
a. added include for maputils which is a new class used for converting iso map coords to world coords

b. added logic for calcuating maxSizeX / maxSizeY which is the max number of tiles that will fit in a given dimension based on the largest tile width | height of all tile sets composing a given tile layer

c. heavily modified code in the render / moveTileSprite methods for isometric rendering. will probably need to add comments explaining calculations etc here...

2. maputils - new class with methods for determining isometric world coordinates from tile cooordinates

3. tilemap - added conditional check to determine orientation of tilemap - result determines what type of tilemap (orthogonal / isometric) will be instantiated

I think that's pretty much it. I did this rather late so I'm kind of expecting that there will be issues. Not sure how you want to sanity check, but let me know and I will put together whatever you need. Code is rough and probably needs refactoring but hopefully it gets the iso rendering path headed in the right direction. Let me know your thoughts!

Thanks again!

-Zach