How to make a zelda-type map with spritekit in swift

I dont know what its called but its the same type of map that zelda and pokemon used to use in the old nintendo games. Everytime I google it I keep getting "side-scrolling mario-like screen how to's".


I'm thinking it would be one very large image and zooming in to just a small piece of the screen some how. I dont want to change backgrounds just stay with the same one. If I can use the square blocks to paint the map in .sks file would be nice too. Obviously I would change maps by going into houses or caves (like pokemon) but I would like it to expand as far as possible until I decide to switch to a new map.


PS. Please Swift only

It's called an over-head tile-based map / background / world.


With XC8 you can use the tile-map editor to do the heavy-lifting of your world. Then, add your player as a spritenode, then add a camera as a cameranode--center your camera on the middle of the screen (don't have it follow the player).


In your .update() you can check for your players position (such as a tile location) and then scroll the camera by however much you want.


So if you have a world that is 100x100 tiles, and each "screen" your character walks around in is 10x10 tiles, then when your character's position moves to a tile that ISN'T in view, you move the camera 10 tiles in that direction... your 'scrolling' effect ala Pokemon / Zelda 1.


You can do the same thing without tilemaps as well, but it would be much simpler.

How to make a zelda-type map with spritekit in swift
 
 
Q