Possibly related: Optimizing SceneKit performance with high-res textures
I am mapping a SKScene
onto a board geometry to create a board game. The scene needs to be relatively large (2048x1024) so that I can zoom in on the action and still have pretty details. Now, to solve this common problem I already know about two approaches:
- Use lower resolution textures when zooming out (i.e. mipmapping) -
That's not an issue,
SceneKit
does it for me. - Tile the scene for close-ups and only display those tiles that are on screen.
Now the second point gets me thinking. How can I tile up a SKScene and map them to different locations on the geometry? Is there another way to make this work?
Screenshots
This is the geometry with a static image (2048x1024) as texture:
This is the geometry with a SKScene
(2048x1024) as texture:
The scene does not contain any physics bodies, just about 40 SKSpriteNodes
that do nothing. I need it to be able to change the colors of territories, maybe add some additional overlays etc. Would there be a way to do that with SceneKit
, entirely? Maybe create a geometry for each territory?
Implemented Answers
I have now tried to achieve the same scene using SceneKit
only. Each territory is a quad, using textures with pre-rendered borders included. Different blend modes help the underlaying paper texture to come forward. Unfortunately, the performance hit is roughly the same - My conclusion is that it's not SpriteKit
after all that hogs resources, but the node count in combination with high-res textures (which are sadly needed to keep borders crisp if you're not using paths).