j.s.com
j.s.com

Reputation: 1458

Alternatives for Mac OS X SpriteKit

I program in Xcode Swift 2.2 and use SpriteKit für my User Interface. I do not need any Animation, just lots of static pictures, that can overlap and must support transparency. Any "animation" is made manually by changing the pictures to others, what means changing the Sprite Nodes to a new picture. This works well with a small amount of nodes, but when I have over 100.000 nodes, the performance is very bad. User Interface Actions like pulling down a menu or typing text works very very slow. So I look for an alternative without changing completely all of my code.

I look for a Mac OS X Library (not iOS) that supports something like a View with can be filled with rectangled pictures manually (but with transparency). The pictures come from one big picture, which contains all pictures I need. In SpriteKit I can assign a picture area to a node which is a sub-picture of the big picture like this:

let SmallPict = SKTexture(rect:myrect, inTexture:mypicture))

I need to overlap the pictures. In SpriteKit pictures overlap when placing at the same coordinates.

I only need 2D but very fast changes of the pictures must be possible.

Any idea which Class Library (perhaps a SubClass of NSView) might be right for this?

Upvotes: 0

Views: 490

Answers (1)

s1ddok
s1ddok

Reputation: 4654

Consider using Cocos2D it has built-in batching, so it can improve performance on drawing thousands of similar nodes.

https://github.com/cocos2d/cocos2d-objc

Upvotes: 1

Related Questions