I'm programming a game with SpriteKit and I have a map like the one I attached and the protagonist is jumping from point to point, and at each point there is a game. I put the points on the image, but depending on the screen resolution, that point is run.
Someone has a manual on how to do this, or who can help me to do it.
The points are placed depending on the image that the designer gives me.
At this moment I am placing the points like this, and I get an error depending on the resolution of the device, since the point is not in the same place.
let point = getPoint() //Devuelve un SKShapeNode circular
point.position = CGPoint(
x: 100,
y: 100
)
The image I leave it with high equal to the height of the screen: self.frame.height
and proportional width.
Although now I'm trying to place the points depending on the dimension of the image with percentages, like this:
let point = getPoint() //Devuelve un SKShapeNode
point.position = CGPoint(
x: map.frame.width*0.05,
y: map.frame.height*0.7
)
A thousand grace in advance.