Reputation: 21
I've currently been working on a battle scene for my app similar to what you would see in pokemon, with HUD for each character (3 characters per side). For each label and image I have been using
addChild(SKSpriteNode)
adding each label and character to the screen individually. At its current state my screen has 70 nodes on it and my draw count is over 100 making things very laggy. What is a more efficient way to do this?
Upvotes: 0
Views: 42
Reputation: 1979
Make sure ignoresSiblingOrder
is true
(use zPosition
to control the layering and try to keep the number of distinct positions small). If your sprite nodes have different textures, be sure they're in an atlas. And avoid shape and label nodes.
Upvotes: 2