Giter Club home page Giter Club logo

jstilemap's Introduction

JSTileMap is a TMX Map viewer for SpriteKit

Include

JSTileMap.m
JSTileMap.h
LFCGzipUtility.h
LFCGzipUtility.m

In your project. You will also need to add libz.dylib to the "linked frameworks and libraries" section of your project itself.

Loading a map

...

JSTileMap* tiledMap = [JSTileMap mapNamed:@"mapFileName.tmx"];
if (tiledMap)
	[mySKNode addChild:tiledMap];
	
...

Browse the properties in JSTileMap and TMXLayer for most of what you'll use frequently. Limited accessor methods are included for convenience.

Tile atlases are expected to be in the same directory as the TMX file when loaded.
At the moment this is only trying to load files from the app bundle itself.

The repository also contains an example project, containing the above files, that will give you a general idea of how layers, tilesets, and objects work, and a few examples of what does (and does not) currently work.

** NOTE: The TMX map format is in pixels, not points like apple's format. As such, you should -NOT- use the @2x format for your sprite atlas images or the map won't load properly.

** NOTE 2: Isometric maps are currently considered to be in beta as there are bugs with tile object positioning in isometric maps. If you do not use tile objects you should be able to use isometric maps.

Mac support works but there are points / pixels issues with the atlas images. Should be considered beta.

jstilemap's People

Contributors

mk2 avatar slycrel avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.