3
\$\begingroup\$

I am using Sprite Kit to do game development. I would like like to design an archery with arrow. Should I use the arrow as one of the node? If so, it is a concern to have too many arrow on the screen, so that the performance will be slower? What do you think?

\$\endgroup\$
2
\$\begingroup\$

Particles in SpriteKit are meant for visual effect. They cannot be given physics bodies in the default SK implementation. This would make them very inappropriate for a logical object in your game. Definitely use nodes.

Don't worry about performance at this point. It's unlikely to matter, and if it does, you can research ways to improve performance through SpriteKit and other iOS APIs. (Or ask a performance improving question on gamedev.SE with the specifics of your code/implementation)

If you really want to ensure some performance benefit from the start, use circles as the physics body type for your arrows (a small circle at the tip, for example). Reuse SKActions when you can, and definitely reuse textures for the arrows. However, I would reiterate that it's unlikely you'll really have problems, and should deal with performance when it becomes a problem.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.