0
votes
0answers
33 views

Cocos2d-x , setup the debug environment and remove the red marks in my eclipse

I am struggling with this issue since last week. I still can’t figure out where is the error. My code is compiling perfect if I restart the eclipse. but, when I edit the c++ file it shows red marks ...
0
votes
0answers
109 views

cocos2d-x-3.0rc0b Build fails

I have created a cpp Cross platform project with cocos2d-x-3.0rc0 on windows8 , but i can't build the android project. I have the following result: C:\home\MyGame\proj.android\proj.android>python ...
1
vote
2answers
145 views

Best logic to create and drop new gems in a Match-3 game

In a simple match-3 game, with a square gems matrix creating and dropping new gems is fairly simple: when needed I generate those gems above the matrix and then I make them fall into the main matrix ...
1
vote
2answers
164 views

How do I separate testable game logic from my UI in Cocos2d-x?

I read some articles on why I should separate game logic and UI code: That makes it possible to test game logic code can be independently of the rest. However, I am having trouble implementing this in ...
0
votes
0answers
130 views

Should I drawing directly on CCLayer or CCSprite?

Now I am a little confused in my cocos2d-x cpp project. I want to draw lines with user's finger touch. Following the screenshot of a CCScene: In the screen, there are two squares. I want show an ...
0
votes
2answers
143 views

Implementing `fling` logic without pan gesture recognizers

So I am trying to port over a simple game that I originally wrote to iphone into cocos2d-x. I've hit a minor bump however in implementing simple 'fling' logic I had in the iphone version that is ...
1
vote
0answers
292 views

Cocos2d-x CCFollow Zooming issue

Hi I am currently building a cocos2d-x game which incorporates pinch zoom using CCLayerPanZoom class which can be found here The problem is basically when using CCFollow and zooming and out, it ...
0
votes
0answers
73 views

cocos2dx and tweenings libs

I know cocos2dx has built-in actions like move-to, etc... to do some kind of tweening but haven't seen any way for example to add different easy ins and outs. Browsing the documentation haven't found ...
2
votes
1answer
543 views

Pixel Perfect Collision Detection in Cocos2dx

I am trying to port the pixel perfect collision detection in Cocos2d-x the original version was made for Cocos2D and can be found here: ...
0
votes
1answer
152 views

How to get position of CCSprite added to CCParallaxNode?

I have a CCparallaxNodeExtras that scrolls infinite (following the space game tutorial). I added as a child a CCSprite made of other CCSprite, like this: _backgroundNode = ...
0
votes
1answer
124 views

How do you align the edges of sprites?

If you have SpriteA and SpriteB. SpriteB is a child of SpriteA. Does anyone have a mechanism to come up with the left, right, top, side of a boundingbox() of SpriteA? What I'd like to do is align ...
1
vote
1answer
1k views

How to switch sprite animations in cocos2d-x?

I have a "GameCharacter" class where I have a sprite for my main character in the game, I loaded the frames and animations correctly. I can switch between animations with single touches or swiping ...
0
votes
1answer
990 views

How to set multiple animations in cocos2d-x

I'm currently starting with cocos2d-x to build games for blackberry/android/iOS. I have the png and plist for the animations of a character created with texturepacker. I load them with ...
2
votes
0answers
320 views

Not able to change the background of the scene in cocos2dx android

I have started Game Development using Cocos2d-x. And started with HelloWorld sample game. I am able to run this sample game. But when I try to change the Background Color, I am getting error in ...
0
votes
1answer
631 views

Can't Build Cocos2Dx emscripten project

I need to port a Cocos2D-x project to Web (JS+HTML5). I'm trying to compile cocos2D-x samples using the emscripten project for cocos2d-x, and I've followed this tutorial ...
0
votes
1answer
600 views

cocos2d-x - object creation and management in game design

How do others keep track of everything going on in their games? I am working on a new game and I am quickly realizing everything that I need to keep track of. Example: Maybe a layerManager that ...
0
votes
0answers
843 views

Getting Image From URL , Using curl in Cocos2dx C++

I am using curl in C++ to get an Image from a URL for a Cocos2dx Game. The Code is Working Fine. And using CCImage And cocos2d::CCTexture2D I create a Sprite and Add it on my Layer. The Sprite is ...
4
votes
2answers
1k views

How to achieve smooth movement with a fixed timestep

Previously in the update method of my game I was using a variable time step which provided very smooth movement of a player sprite except when the frame rate would drop, even slightly. At that point I ...
1
vote
0answers
110 views

Masking a CCLayer

I have a CCLayer (itemLayer) that has a bunch of CCMenuItemImage (itemButton) objects in it placed vertically in a column. These itemButton objects go way past the bounds of the screen and the ...
0
votes
2answers
795 views

Integrating SQLite to Cocos2d-x at Xcode

I have downloaded SQLite C/C++ interface to work with Cocos2d-x. Created a database by Firefox SQLite plugin. Then tried the following code // sqlite implementation sqlite3 *db; ...
3
votes
0answers
1k views

Deep Cloning C++ class that inherits CCNode in Cocos2dx [closed]

I'm stuck with something in Cocos2dx ... When i copy my class that inherits CCNode, i get a shallow copy of my class but the base type seem to still point to the original node address. We dont seem ...
3
votes
1answer
3k views

Sprite Animation using cocos2dx 2.0.2

I am trying to implement sprite animation using coco2dx. I have tried several demos, but all of them are same. While I tried, getting violation error in my code. ...
1
vote
2answers
379 views

How to swallow touches on CCMenu while sliding?

I'm creating a sliding menu for my game something like angry birds level selection but I'm having problem with buttons. If I accidentally touch any of the buttons while swiping the level starts to ...
1
vote
1answer
1k views

Simple way to post score from my game to Facebook and Twitter?

What's the best and simple way to post score from my game to Facebook and Twitter with store link in cocos2d-x?
3
votes
2answers
3k views

How to setup Cocos2D-X (Android) under Mac OS X?

Hi I've made a small game for iPhone that I also want to run on Android but I'm having problems setting up Cocos2D-X for Android. I've downloaded and installed Android SDK and NDK (under my ...
1
vote
2answers
2k views

Problem using ccTouchesEnded/ccTouchesBegan to move sprite in cocos2d-x?

I'm using ccTouchesBegan/ccTouchesEnded to move sprite from one point to another but I'm having problem, if i give two or more consecutive inputs one by one while sprite is moving(runAction is being ...
2
votes
2answers
641 views

Importing a windows project into android using cocos2d-x

What I am trying to do today is to import a full project to Android, but no tutorials are available for that that I have seen. My approach was to create a new android project, copy all the classes and ...
3
votes
1answer
1k views

Callback a function when a label is touched in cocos2d-x?

How do I callback a function when label is touched in cocos2d-x?
3
votes
2answers
6k views

Create an infinite scroll using CCParallaxNode in Cocos2D-X

I'm trying to create an infinite scroll using two images in a CCParallaxNode, making one move to the end of the scroll when it gets off the screen. I have tried several implementations but none has ...
8
votes
3answers
10k views

How to play animations in Cocos2d-x?

I'm new to Cocos2d-x and looking for a good way/tutorial on how to play animations in Cocos2d-x.
2
votes
1answer
3k views

Problem playing music and sound effects in Cocos2d-x

I'm new to Cocos2d-x and working on a mac. I'm trying to play music in my demo project but I'm unable to include "SimpleAudioEngine.h" in the default HelloWorld Project. I tried adding CocosDenshion ...