Tag Info

New answers tagged


What you see right now is cause by aspect ratio change (for example from 3/2 to 16/9) which causes everything to look wide. There are multiple ways that you might fix this issue: The easiest one is to tell engine what is your design resolution, and how should engine respond to resolution changes. Should it scale everything to completely fit the screen? or ...


I think you completely misunderstood the whole concept of create function. "create" functions in cocos2d design are kinda replacement for constructors (and new operator). They are all static functions, calling appropriate "init" functions. They return nullptr on failure or an instance, introduced to garbage collector or succeed. So you should change your ...


It seemed that the problem was fixed by using the 32-bit version of python instead of the 64-bit.


This is the most basic code of creating and playing an animation in cocos2d: auto cacher = SpriteFrameCache::getInstance(); cacher->addSpriteFramesWithFile("emad-running.plist"); Sprite* someSprite = Sprite::create(); // load all the animation frames into an array Vector<SpriteFrame*> frames; for (int i = 0; i <= 10; i++) { stringstream ss; ...

Top 50 recent answers are included