Vyachaslav Gerchicov
Vyachaslav Gerchicov

Reputation: 2457

How to import single tileset image into xCode (Sprite Kit)?

Example of tileset:

http://www.rpg-studio.org/wiki/images/9/92/Tileset.png

How to import these images into this grid in Xcode?

https://koenig-media.raywenderlich.com/uploads/2016/06/AdjacencyTileGrid.png

The problem is Xcode doesn't understand that there is a lot of subimages inside parent image.

I've already saw a lot of examples which use tiled map editor but it has its own format and you can't design such levels in Xcode's visual editor. So they are not appropriate for me.

I also saw that people always avoid to use tilesets - they somewhere get a lot of separate images instead and doesn't describe what to do with a single big tileset.

Upvotes: 2

Views: 1127

Answers (1)

Mark Brownsword
Mark Brownsword

Reputation: 2307

The simplest solution might be to just start with individual images that can feed into Xcode’s image handling pipeline.

My understanding of the Tilesets you’ve described is they are produced from individual images with a tool like TexturePacker which is then consumed by the Tiled Map Editor. The tmx maps produced by the Tiled Map Editor are consumed in Xcode using SKTiled for Swift or JSTileMap for Objective-C.

Upvotes: 1

Related Questions