Search code examples
cocos2d-xcocos2d-x-3.0

Alternative for object pools in cocos2d-x v3.3


i am migrating my game from AndEngine, there I always used object pools for efficient use of objects like bullets etc in my game. What alternate do i have in cocos2d-x for this scenario?


Solution

  • Unfortunately Cocos2d-x doesn't have built-in object pool. Cocos2d-JS(Cocos2d-HTML5) does have it in extensions.

    But you can implement your own object pool like the example of some Cocos2d-x book.