cocos2d-x is a cross plaform port of cocos2d-iphone using C++. It supports iOS, Mac, Android, Samsung Bada, BlackBerry Tablet OS, Windows and Linux. It has built-in bindings for Lua and Javascript.

learn more… | top users | synonyms

0
votes
1answer
117 views

does cocos2d cache texture automatically

I know if we want the textures cached we can use the sharedtexture manager to cache them, but since this is on mobile platform , why don't cocos2d-x just do this for all texture loads ? when creating ...
0
votes
0answers
846 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 ...
0
votes
0answers
128 views

Weld Joint Box2d not run

i have two object like this : b2WeldJointDef weldJoint; //frist body bodyDefXich.type = b2_dynamicBody; bodyDefXich.position.Set(3, 2); b2FixtureDef fixtureDef; b2PolygonShape ...
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
votes
1answer
326 views

cocos2d-x export plist from images in windows free tool to use [closed]

as i learn to use cocos2d-x in the part on which i need to animate sprite images all the tutorials shows how to use something that called plist file that maps the coordinates of the images clips . ...
3
votes
2answers
2k views

How to use facebook sdk on a cocos2dx-project

I'm doing a game cocos2d-x, when user gets a high score, I want them to touch on the Facebook icon and share the high score on their Facebook account timeline. tutorials on facebook.developer.com ...
1
vote
0answers
369 views

cocos2d-xna CCScale9Sprite usage

I'm trying to get a CCControlButton to render on my game. Using a basic CCScale9Sprite as the button's background works using the following: var myScale9Sprite = ...
-1
votes
1answer
275 views

are most 2D games tille based? [closed]

So I'm beginning the planing phase for a 2D game that I hope to deploy for iPhone, Android, and maybe windows phone, and I am writing it in Cocos2DX and I'm looking around for map editors that I could ...
0
votes
1answer
596 views

CCSequence with two CCAction

I have two CCActions : CCAction *a; CCAction *b; so how to use CCSequence with two CCActions Thanks
0
votes
1answer
351 views

Rotate Box Sprite With Circle Body

I want to rotate my rectangular sprite with circle body. The problem is the body doest not attached to the centre of the sprite. This was the default behaviour of the body and sprite. But I want that ...
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 ...
1
vote
1answer
237 views

Debug Render In Cocos2d Android

I want to implement debug render for cocos2d android.So I can view how bodies are created. Right now I use gdx.jar file for box2d and load that jar file following way. static { ...
2
votes
0answers
288 views

Can I use a shader with 2 different textures in Cocos2D (x)?

We are evaluating a variety of different graphic engines for use in our game and we want to be able to use 2 different textures for many of our sprite maps. One sprite map would be the standard RGBA ...
-2
votes
1answer
580 views

How to read key value pair in cocos2dx from txt file?

I this is the first time I am developing for BB10 OS using cocos2dx. I need to read key value pair in Cocos2Dx. eg: Skill= 5 Power= Awesome The target is Blackberry 10OS and using QNX ...
1
vote
1answer
2k views

cocos2d-x v2.1 CCSpeed, CCRepeatForever, and CCAnimation jerky at high speed

I worked to port Tim Roadley's cocos2d-iphone example from (Box2D Driven Cocos2D Animation) to cocos2d-x to learn cocos2d-x for a project. It is all relatively simple to do, but I am suffering from ...
2
votes
1answer
238 views

Handle Multiple Scene

For my game, now I adopt the strategy to create multiple scene. For this I have to ask two question please provide your view for my and other members for improvement. I have created single ...
0
votes
1answer
163 views

Camera Calculation

For my game I don't able to decide what camera resolution I have to use ? Normally I use 1024x600 landscape resolution of camera for my game and create single graphics for my game. But I found that ...
-5
votes
2answers
590 views

Cocos2D-X on Steam and iOS App Store [closed]

With Cocos2D-X can I really submit my games to Steam and iOS App Store? It's commercial quality? Do you have some samples of games built on Cocos2D-X that is on sales in Steam? Thanks.
0
votes
1answer
354 views

Get Text dimmensions on CCTextFieldTTF

Hi I want to know the width of the text inside the CCTextFieldTTF but I can't find a way to do it, I want this width so I can move a CCLabelTTF in that position so it can be like a cursor for the ...
3
votes
1answer
552 views

Getting the height of Keyboard on Android

Hi I need to know the height of my keyboard so I can move up some textfield I have in my app. I'm using cocos2D-X but the app don't recognize the keyboardWillShow method. Thanks
1
vote
3answers
1k views

CCUserDefault, iOS/Android and game updates

My game uses cocos2d-x and will be published on iOS platform first, later on Android. I save a lot of things with CCUserDefault (scores, which level was completed, number of coins taken, etc...). But ...
1
vote
0answers
219 views

How do I use Objective-C libraries in Cocos2d-x?

We've created several libraries in Objective-C in the past, and now we're moving to the Cocos2d-x game engine. We can't figure out how to reference and use those libraries (we've also tried compiling ...
1
vote
1answer
427 views

Why doesn't MoveBy work in this example?

I'd like to run an action on a sprite using the MoveBy action. After lots of attempts, I can't achieve the goal... I have issues with the MoveBy in 2 different projects, so maybe I'm missing something ...
0
votes
2answers
796 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; ...
12
votes
5answers
916 views

tunnel effect cocos2d

I am looking to create a similar tunnel effect in COCOS2D (iOS). Could anyone suggest any pointers? ref Video 1 ref Video 2 Till now I have tried with several ring shape sprites with decreasing ...
2
votes
1answer
508 views

Spriting Animation Method

http://www.kickstarter.com/projects/539087245/spriter At 3:00 they discuss that there is a method used to separate the parts of character into individual sprites and move them saving production time ...
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
2k views

Android Cocos2DX using C++ in Eclipse Helios Windows XP

I have used Eclipse Helios 3.6.1 for Java development. I wanted to start C++ development in the same IDE so I installed Autotools Support For CDT, C/C++ Development Tools, C/C++ Library API ...
1
vote
0answers
229 views

Getting contour without the background [closed]

I have a texture and vertex which are needed to create a set of closed polygons. For this purpose I use these functions: Code for create texture: CCSprite* spr = ...
2
votes
2answers
933 views

Implementing a sine using a bezier curve

I'm developing a 2D game using Cocos2d-x. Is possible to use CCBezierTo to parameterize a sine function?
4
votes
1answer
1k views

Isometric Tile maps in Cocos2d-x

Is there an specific isometric tile map handler in cocos2d-x? I can't find any.
4
votes
1answer
722 views

Lua or C++ in Cococ2d-x

I am going to use Cocos2d-x to make a game for Android and ios, but my question is, do I use the Lua integration or only c++, I see Lua useful here because the compilation thing. Or do I use only Lua ...
0
votes
1answer
732 views

Image with FadeIn effect blinks when added to scene

I am trying to add an image to the scene, but it should just be added to the scene invisible, FadeIn and then be deleted when the effect finishes. My problem is that the images blink once when they ...
1
vote
1answer
286 views

Adjust sprite bounds of the visible part of texture

Is there any way to adjust the boundaries of the visible part of the sprite? To make it easier to understand: I have a texture, such as shown at figure 1. Then I break it into pieces and fill the ...
2
votes
4answers
2k views

Different iPhone screen resolutions and game graphics

We are developing a 2D game for iPhone using cocos2d-x. The artists are drawing the raster graphic for a resoluion of 640x960. For older iPhone devices, those that have a resolution of 320x480, should ...
6
votes
1answer
569 views

Puzzle game: clipping of non-convex polygons on the figures

I have an original figure in the SVG file. I need to break it randomly on parts, an example of which is specified below: I have an idea, to use for partitioning Voronoi diagram (Fortune's algorithm). ...
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
0answers
3k views

Where can I find some Cocos2dx beginner tutorials? [closed]

I have tried to start programing with Cocos2dx but I have no idea where to start and the tutorials are no very not very helpful. What I am looking for is some tutorials/guides on how to begin using ...
1
vote
1answer
335 views

New way of integrating Openfeint in Cocos2d-x 0.12.0

I am trying to implement OpenFeint for Android in my cocos2d-x project. My approach so far has been creating a button that calls a static java method in class Bridge using jnihelper functions ...
1
vote
0answers
339 views

Adding Libxml2 to an Android project under Cocos2D-X

I am having problems porting Libxml2. I like it because it works under windows like a charm with <libxml/parser.h>. When I reference the libraries I just cannot find the right path to them, ...
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
642 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 ...