GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - slycrel/JSTileMap: TMX Map viewer for SpriteKit

BranchesTags
Open more actions menu

Latest commit

 

History

35 Commits
35 Commits

Folders and files

NameName
Last commit message
Last commit date
TMXMapSample.xcodeproj
TMXMapSample.xcodeproj
 
 
TMXMapSample
TMXMapSample
 
 
TMXMapSampleMac
TMXMapSampleMac
 
 
TMXMapSampleMacTests
TMXMapSampleMacTests
 
 
TMXMapSampleTests
TMXMapSampleTests
 
 
.gitignore
.gitignore
 
 
LFCGzipUtility.h
LFCGzipUtility.h
 
 
LFCGzipUtility.m
LFCGzipUtility.m
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 

Repository files navigation

JSTileMap is a TMX Map viewer for SpriteKit

** Note: Consider using apple's new SpriteKit tilemap functionality where possible.
See this session from WWDC 2016 for more about this.

=========

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.

tvOS support appears to work out of the box -- make sure you include the zlib library included in the tvOS SDK.

About

TMX Map viewer for SpriteKit

Resources

Readme
License
Activity

Stars

209 stars

Watchers

29 watching

Forks

33 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.