How to make large "mapped" games? Where user explores a map size larger than screen?

Hello,


I am interested in making a game where the user would need to explore a map that would be WAY bigger than the size of the iPhone screen. I'm not exactly sure what this is called or how I would go about googling/researching how to make this work. Could someone please point me in the right direction?


Also, I would have many monsters randomly spawned on this large map. I was thinking instead of loading them all the sprites at once it would be best to have variables for their positions and only load the sprites once they have come into the user's view. Am I correct with thinking this?


**EDIT** Please note I would like to do this in Sprite Kit if possible!! Or I could change platform if needed, but spritekit is what I have been learning to use as of lately.


Thanks,
Peter

Answered by _Agent in 33832022

With iOS 9, you can use SKCameraNode. It applies a scaling factor to show only part of the scene in the SKView. With older versions, you can adjust SKScene's size and anchorPoint properties to keep the relevant part of the scene in view.


I wouldn't worry about many monsters unless you have enough to actually cause performance issues. If it does, Apple's Sprite Kit Best Practices documentation suggests removing off-screen nodes from the tree if you don't need their actions or physics bodies for accurate gameplay. But don't worry about the memory required for textures, because Sprite Kit does automatically unload the texture data if it needs the memory.

Accepted Answer

With iOS 9, you can use SKCameraNode. It applies a scaling factor to show only part of the scene in the SKView. With older versions, you can adjust SKScene's size and anchorPoint properties to keep the relevant part of the scene in view.


I wouldn't worry about many monsters unless you have enough to actually cause performance issues. If it does, Apple's Sprite Kit Best Practices documentation suggests removing off-screen nodes from the tree if you don't need their actions or physics bodies for accurate gameplay. But don't worry about the memory required for textures, because Sprite Kit does automatically unload the texture data if it needs the memory.

The thing is I don't really know where to get started. If anyone knows of a decent tutorial or some info on how I can get the ball rolling please post it here.

How to make large "mapped" games? Where user explores a map size larger than screen?
 
 
Q